Roycesraphim Posted August 20, 2011 Share Posted August 20, 2011 (edited) So the plan I have for a future update is that you lead some people into a room with some water and when they start milling around, you run to the second floor and hit a switch that enables a marker that is parent to sparking effects in the water and on the walls and to the trigger for the ground floor. This is the script I plan for the ground floor trigger. Ideally, with at least 5 people down there, I plan for a few people to get shocked at a time and you have to run and reset the generator (the switch you hit first) to reactivate the trigger. scn VTFIMQ2WatertrapScript short shockcount Begin Ontrigger If (getstage VTFIMQ2 == 164) DamageActorValue Health 5 set shockcount+1 setenemy VTFFaction VTFFaction VTHamEslin 0 0 setenemy VTFFaction VTFFaction VTHamPhae 0 0 setenemy VTFFaction VTHamPhae Player 0 0 setenemy VTFFaction VTHamEslin Player 0 0 Elseif (getstage VTFIMQ2 == 168) DamageActorValue Health 5 set shockcount.shockcount+1 setenemy VTFFaction VTFFaction VTHamEslin 0 0 setenemy VTFFaction VTFFaction VTHamPhae 0 0 setenemy VTFFaction VTHamPhae Player 0 0 setenemy VTFFaction VTHamEslin Player 0 0 endif END Begin gamemode If shockcount == 5 ShockTrapMarker.disable showmessage VTFIMQ2GenOverload endif end Edited August 20, 2011 by Roycesraphim Link to comment Share on other sites More sharing options...
LordWushin Posted August 21, 2011 Share Posted August 21, 2011 Looks good! Hope it works out well. Link to comment Share on other sites More sharing options...
Roycesraphim Posted August 21, 2011 Author Share Posted August 21, 2011 so will damageActorValue without a REF damage everyone in the trigger? Link to comment Share on other sites More sharing options...
Glenstorm Posted August 21, 2011 Share Posted August 21, 2011 You may be better off using GetActionRef inside the onTrigger block. Something likeref npcID; BEGIN OnTriggerset npcID to GetActionREF;npcID.DamageActor Value.........END Btw your shock count code is wrong. It should be something like set shockcount to shockcount + 1 Link to comment Share on other sites More sharing options...
Roycesraphim Posted August 24, 2011 Author Share Posted August 24, 2011 Thats the problem, I want it to trigger for any one who walks into the area (water). I'd rather not list every enemy NPC and just have them get hurt when they enter. Link to comment Share on other sites More sharing options...
Glenstorm Posted August 25, 2011 Share Posted August 25, 2011 Thats the problem, I want it to trigger for any one who walks into the area (water). I'd rather not list every enemy NPC and just have them get hurt when they enter. The code above works for any NPC, as long as they enter the trigger. Adding each enemy reference is insane as there may might as well be hundreds of unique references + randomly generated references + ones added by mods. If you want yours to trigger for only one reference (like the Player) you need to specify that in the ontrigger block BEGIN onTrigger Player...END Link to comment Share on other sites More sharing options...
Recommended Posts