Page 1 of 1

Trigger problems, could be mapping and/or scripting???

Posted: Mon Mar 15, 2004 9:10 pm
by dooguesgoober4
I made a post about this in the mapping forum too....hoping i could get at least some help from either side of the mapping/scritping world...

Here is a picture of the triggers i have set for a "secret" hatch that opens when the triggers are used....

Image

And here is a copy of the script that is used to move the trigger....

Code: Select all

//---------------------------------------------
// Manhole_Cover2
//---------------------------------------------
manhole_cover2_mover:
  while(1) // Forever
  {
    $manhole_cover2_trigger waittill trigger
    $manhole_cover2 time 2
    $manhole_cover2 playsound ("door_metal_open_move" + (randomint(3) + 1))
    $manhole_cover2 rotateXup -90
    $manhole_cover2 waitmove
    $manhole_cover2_trigger waittill trigger
    $manhole_cover2 playsound ("door_metal_close_move" + (randomint(1) + 1))
    $manhole_cover2 rotateXdown -90
    $manhole_cover2 waitmove
    $manhole_cover2 playsound ("door_metal_close_stop" + (randomint(2) + 1))
  }
  // removed a goto and replaced it with a while loop
end
And for some reason...the trigger does not work in game...can anyone help me????

Posted: Tue Mar 16, 2004 12:13 am
by Bjarne BZR
That random number generation is not nessesary, MOH:AA does that automagically if you have sonds like "x1", "x2" and "x3". Just play "x" :)

So to your prob: are you getting any scrip errors in the console?

Posted: Tue Mar 16, 2004 1:12 am
by nuggets
i'd replace all the triggers that you have with one trigger over the hatch

Posted: Tue Mar 16, 2004 3:47 am
by dooguesgoober4
No i dont have any script errors but i did what nugget said and it works perfectly fine now.....the one trigger on the left was working instead of the other two so i jsut took the one on the left and made it larger......thanks!

Posted: Tue Mar 16, 2004 1:47 pm
by bdbodger
If you have more that one entity with the same targetname if forms an targetname array so you can't use

$manhole_cover2_trigger waittill trigger

you would use

$manhole_cover2_trigger[1] waittill trigger
$manhole_cover2_trigger[2] waittill trigger
$manhole_cover2_trigger[3] waittill trigger

Posted: Tue Mar 16, 2004 5:56 pm
by dooguesgoober4
OOOhhh okay i understand that now...but thanks to hoss i just made the one trigger that WAS working and made it bigger to fill the whole trigger void.....thanks!!