Results 1 to 1 of 1
Threaded View
-
06-09-2010 #1
Mission scripting: Weapon buy Menu
Mission Scripting: Weapon buy menu
Description: Make a simple buy menu in men fo war that you can buy weapons for you person
1. first you need to create a 2 people (the seller, the buyer) and give the buyer a tag that you wish do give him
2. create a table in front of the seller in decor/wood_table
3. create a small zone were the buyer needs to stand in order to buy stuff
4. now press f9 while in f3 mode and go to reinforments and create the reinforment called BAR_buy
5. fill out the following parms
state: hidden
Text: The item name
image: if avaible
hint: Buy_Item name
count: how many does seller have -1 for infinate
score: how much it costs
event_end: itemname_buy
6. now were done with the simple part now create a new trigger call it buy_menu/wait_till
7. i used the script from the mi file for this since i find it hard to explain it
8. now we need to create another trigger for when the player leaves the areaCode:{condition {terms {"1.near" {units {player "0"} {state "not dead"} } {near_to {zone "buy_area"} } } } } {actions {"reinforcement" {operation show} {name buy_bar} } {"switch" {"case" {condition {type event} {id "bar_buy"} } {"inventory" {selector {tag the_buyer} } {action add} {item "bar"} } } } {"event" {event "buy_menu_start"} {mode toggle} {delay 0} } {"event" {event "bar_buy"} {mode reset} {delay 0} } {"trigger" {name "buy_menu/wait_till"} } } }
Note: you need to create the event buy_menu_startCode:{"buy_menu/leave_buy" {condition {expression "!1 & 2"} {terms {"1.near" {units {tag the_buyer} {state "not dead"} } {near_to {zone "buy_area"} } } {"2.event" {id "buy_menu_start"} } } } {actions {"reinforcement" {operation hide} {name buy_bar} } {"event" {event "buy_menu_start"} {mode reset} {delay 0} } {"trigger" {name "buy_menu/leave_buy"} } } } } }
note2: the mi file only shows editied/modified parms so you only need to chanage the parms that are shown
9. on you second tirrger condition on the bar click edit and add this !1 & 2
10. start map and if you did everythink correctly it should work
i uploaded an example map for makeing this simply place it in your men of war/resource/map folder and start editor and load it
http://www.filefront.com/17268476/buy_menu_testmap.rar
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)





Reply With Quote
Bookmarks