<jumping...>
The Deal: I am trying to improve Pen's Duck Duck Duck trap. What she gave me works, but... *big* but. <careful, boss!> Er, I mean to say, *I* have issues with it. She set it up so that there are three triggers with associated waypoints running down a corridor. When a PC enters a trigger, it (among other things) spawns a placeable, delays 4 seconds and destroys the placeable.
It's actually a pretty clever idea. The placeable is an "Action Icon":
That exists just to give the PC a chance to duck... something. And it works.
The issue: action_duck is a *huge* model! Spawning it in causes about a 3/4 second stutter on my laptop. Each time. So I decided (with permission) to try a different approach. I created a hidden room off to the side. Put in WP_DUCK0 and placed an action_duck there waiting. Then I changed the trigger scripts so they would jump action_duck from WP_DUCK0 to WP_DUCK1 (or 2 or 3, depending), wait 4 seconds and jump it back into hiding.
Doesn't work.
action_duck never shows up. Rest of trigger script (that "activates" the trap model for a 3 second anim) doesn't fire. It did before and I did not change that part.
Trig_duck1
void main(){
// on_Enter tr_duck1
// Get entering object
object oPC = GetEnteringObject();
object oWP0 = GetObjectByTag("WP_DUCK0");
object oWP1 = GetObjectByTag("WP_DUCK1");
object oAct_Duck = GetObjectByTag("action_duck");
location lLoc = GetLocation(oWP1);
object oDuckTrap =(GetObjectByTag("PLC_DUCKTRAP"));
// Check if PC
if (GetIsPC(oPC)) {
// Stop PC
AssignCommand(oPC,ClearAllActions());
// Move action_duck to WP_DUCK1
AssignCommand(oAct_Duck,JumpToLocation(lLoc));
// Move action_duck back after 4 seconds
lLoc = GetLocation(oWP0);
DelayCommand(4.0f,AssignCommand(oAct_Duck,JumpToLocation(lLoc)));
// DelayCommand 4seconds Activate plc_ducktrap
DelayCommand(4.0f,AssignCommand(oDuckTrap, PlayAnimation(ANIMATION_PLACEABLE_ACTIVATE)));
// destroy trigger (self)
DestroyObject (OBJECT_SELF, 6.0f);
}
}
Ideas?
<...from topic to topic>
Modifié par Rolo Kipp, 04 février 2012 - 06:16 .