Game Modding | Call of Duty: Black Ops 3 | Scripting
ModmeBot:
Thread By: soul-toktzt
I'm trying to makea script where players need to press a button and run to the other side of the hallway, but if they don't make it in time, they get teleported back.
i've been trying for a long time now and i can't really manage it, everything works, except the teleportation happens the moment you touch the trigger when you start to run into the hallway, not when you are touching the trigger AFTER the doors closed again.
Could anyone take a look please?
Thanks in advance!
ModmeBot:
Reply By: Abnormal202
soul-toktzt
I'm trying to make a script where players need to press a button and run to the other side of the hallway, but if they don't make it in time, they get teleported back. i've been trying for a long time now and i can't really manage it, everything works, except the teleportation happens the moment you touch the trigger when you start to run into the hallway, not when you are touching the trigger AFTER the doors closed again. Could anyone take a look please? Thanks in advance!
ModmeBot:
Reply By: soul-toktzt
Abnormal202=""></gates.size;i++)> Hey, thanks, i was planning to do it in an array, but no idea why i didn't do it.
soul-toktzt I'm trying to make a script where players need to press a button and run to the other side of the hallway, but if they don't make it in time, they get teleported back. i've been trying for a long time now and i can't really manage it, everything works, except the teleportation happens the moment you touch the trigger when you start to run into the hallway, not when you are touching the trigger AFTER the doors closed again. Could anyone take a look please? Thanks in advance! I'm not entirely sure what the problem is, but I do see some inefficiencies with the script. For one, since you are moving all the gates at the same times, I would recommend making them an array by giving them all the KVP targetname: gate and using this: gates = GetEntArray("gate","targetname"); then everytime in script when you want to move all of them, just use: for(i=0;i<gates.size;i++) {="" gates="" movez(91,1);="" }="" it's="" not="" necessary,="" but="" it's="" important="" you="" start="" working="" with="" arrays="" if="" you="" want="" to="" get="" better="" at="" scripting,="" and="" saving="" long="" list="" typing="" of="" things="" like:="" front_gate="" movez(91,1);="" end_gate1="" movez(91,1);="" end_gate2="" movez(91,1);="" end_gate3="" movez(91,1);="" wait="" 10;="" front_gate="" movez(-91,5);="" end_gate1="" movez(-91,5);="" end_gate2="" movez(-91,5);="" end_gate3="" movez(-91,5);="" wait="" 5;="" maybe="" it's="" not="" so="" bad="" with="" 4="" items,="" but="" wait="" til="" you="" have="" to="" move="" 20="" things,="" or="" a="" 100="" things="" at="" once.="" ="" then="" you="" have="" a="" while()="" in="" there="" for="" no="" reason:="" while(1)="" {="" areatrig="" waittill("trigger",="" player);="" player_teleporter_init();="" }="" break;="" since="" you're="" not="" looping="" anything,="" it="" could="" just="" be:="" areatrig="" waittill("trigger",="" player);="" player_teleporter_init();="" you're="" gonna="" have="" to="" be="" specific="" with="" the="" problem.="" although="" your="" script="" is="" a="" little="" inefficient,="" i="" think="" it="" should="" still="" work, except="" for="" that="" you="" never="" thread="" your="" original="" function="" again,="" so="" it="" should="" be="" impossible="" to="" hit="" the="" button="" and="" run="" for="" the="" gates="" again="" (but="" maybe="" you="" wanted="" it="" that="" way).="" ="" anyway,="" don't="" think="" i'm="" being="" mean,="" we="" all="" have="" to="" start="" somewhere,="" and="" mistakes="" are="" how="" we="" learn.="" i="" prefer="" a="" post="" asking="" for="" help="" on="" a="" script="" way="" more="" than="" a="" post="" asking="" for="" someone="" else="" to="" make="" a="" script="" for="" them.=""
ModmeBot:
Reply By: Abnormal202
soul-toktzt
Edit2: I changed it a bit, so now the end-gate pushes the ones inside the hallway all the way to the beginning :)
ModmeBot:
Reply By: soul-toktzt
Abnormal202
soul-toktzt Edit2: I changed it a bit, so now the end-gate pushes the ones inside the hallway all the way to the beginning :) Does that mean you got it working? or are you still having problems?