This should be a simple one I think, but one that's useful for lots of scripting noobs too xD
How do I make a trap deactivate if an object is attacked?
(i.e. I have a statue that when shot with an arrow, or anything, deactivates the trap in the room)
I thought this would be easy to make with other scripts I've found, but I can't get it to compile...
So far I have made this to go in the OnDamaged or OnPhysicalAttacked script slots:
- void main()
- {
- object oPC = GetLastDamager();
- if (!GetIsPC(oPC)) return;
- object oTrapObject = GetObjectByTag("TRAP_TAG_HERE");
- SetTrapActive(FALSE, oTrapObject);
- }
Thanks for the help! (in advance)
I would also like it if when attacked, a visual effect of fire began on the statue. (The statue is the CEP one holding a bowl over it's head) I'd like to have some fire appear in that bowl, but obviously I don't want the fire re-triggering again and again if the PC starts shooting the statue for whatever reason ^^
- bottle
Modifié par Lethal_Bottle, 24 septembre 2010 - 07:41 .





Retour en haut






