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

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
dooguesgoober4
Captain
Posts: 246
Joined: Fri Oct 17, 2003 1:00 am
Location: Akron, OH
Contact:

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

Post 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????
~DooGues~

Image
Download Now!!
Bjarne BZR
Site Admin
Posts: 3298
Joined: Wed Feb 05, 2003 2:04 pm
Location: Sweden
Contact:

Post 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?
Admin .MAP Forums
Image
Head above heels.
nuggets
General
Posts: 1006
Joined: Fri Feb 28, 2003 2:57 am
Location: U-england-K (england in the UK) :P
Contact:

Post by nuggets »

i'd replace all the triggers that you have with one trigger over the hatch
hope this helps, prob not cos it's all foreign 2 me :-/
dooguesgoober4
Captain
Posts: 246
Joined: Fri Oct 17, 2003 1:00 am
Location: Akron, OH
Contact:

Post 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!
~DooGues~

Image
Download Now!!
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post 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
Image
dooguesgoober4
Captain
Posts: 246
Joined: Fri Oct 17, 2003 1:00 am
Location: Akron, OH
Contact:

Post 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!!
~DooGues~

Image
Download Now!!
Post Reply