next victory script... :P


(system) #1

room_door
{
 spawn // this is called when the game starts and the entity is spawned
{
wait 200

constructible_class 3 // this indicated that the oasis_wall entity is a dynamitable-only 

entity... 
}

death // this is called when the entity is destroyed... 
{

wm_announce "Allies have breached the Axis Power Room Door!" // ... when the entity is 

destroyed, you annouce the message to all players in game with this


}
}

power_gen
{
 spawn // this is called when the game starts and the entity is spawned
{
wait 200

constructible_class 3 // this indicated that the oasis_wall entity is a dynamitable-only 

entity... 
}

death // this is called when the entity is destroyed... 
{

wm_announce "Allies have breached the Axis Dam Power Generator!" // ... when the entity is 

destroyed, you annouce the message to all players in game with this


}
}

Can somebody paste here a victory script? i see other topic but it didnt work for me :confused:
PLZ HELP!
ps. new map incoming… :smiley:


(Mean Mr. Mustard) #2

Need a little more info to help with a victory script - like when do you declare victory. Is that your entire script?

I suggest this: put in a wm_announce “team has one - end round” in your script. Then when playing, make sure you get that announcement. If you do, then post your script and I’ll help you set the victory.

A few things:

  1. need to set wm_setwinner (0=axis,1=allies) in game_manager
  2. after setting wm_setwinner add teh line wm_endround
  3. also, set wm_setwinner initially to the winner if time runs out

Was anything of use in the other post? (since I did the replies :P)


(system) #3

if allies destroy power_gen allies win … :stuck_out_tongue: anybody can help me?


(Mean Mr. Mustard) #4

Do you get the “Allies have breached the Axis Dam Power Generator!” message when the allies blow the generator?

If so, all you should have to add is: (see the last 3 lines)

power_gen 
{ 
     spawn // this is called when the game starts and the entity is spawned 
     { 
          wait 200 

          constructible_class 3 // this indicated that the oasis_wall entity is a  dynamitable-only 

entity... 
     } 

     death // this is called when the entity is destroyed... 
     { 

          wm_announce "Allies have breached the Axis Dam Power Generator!" // ... when the entity is 

destroyed, you annouce the message to all players in game with this 

          // add these three line
          wm_setwinner 1               //set allies as winner
          wait 500                          // pause a little
          wm_endround                 // stop game - allies win flags should show up
     } 
} 


(system) #5

i dont know why this not working :frowning:


(Mean Mr. Mustard) #6

Do you have a game_manager section in your script?

game_manager
{
spawn


(Mean Mr. Mustard) #7

Do you have a game_manager section in your script? If not add something like this to the top of your script

game_manager
{
     spawn
     {
           // set default winner
           wm_setwinner 0
           wait 500
     }

}

(system) #8

i havent got… but i need a script/script multipayer??


(Mean Mr. Mustard) #9

I read some where that all scripts should have a game_manager section at the top.

Do you get any of your wm_announce messages when you complete a task? If not, then the script is not working. Constructibles and destructables work without scripts