I am trying to create an area where a player must turn traps on and off using different levers to create a safe path.
While this may sound neat, getting it to work is becoming quite the headache.
I have been using the function SetTapActive() to turn the traps on and off. As a bit of frustration, I discovered that the traps must be set to disarmable for this function to work.
Setting the trap to not detected is now the main issue I am now having. Currently the trap will be disarmed by the lever but will remain a red rectangle. The player can walk on it with out trigger the trap, but there is now way to know if it is disarmed without stepping into the red square. With multiple traps on the map trying to guess which ones turned off with the lever will not work.
I have looked at the functions but none seem to remove the red visual. SetTapDetectable(FALSE) will not turn a detect a trap to an un detected trap and SetTrapDetectedBy() will only turn a non detected trap to detected but not the other way around. I can find no other functions or an include to deal with traps.
If there is no way to set a trap as not detected I could as a visual effect over the trap to show it is off. I can't just delete the traps as the levers will also reactivate traps.
Any ideas or suggestions?
Is there a way to undetect a trap?
Débuté par
Shaughn78
, avril 03 2011 08:24
#1
Posté 03 avril 2011 - 08:24
#2
Posté 03 avril 2011 - 08:59
Shaughn78 wrote...
If there is no way to set a trap as not detected I could as a visual effect over the trap to show it is off. I can't just delete the traps as the levers will also reactivate traps.
I don't think you should reject this option that quickly. You can always use a script to create a trap at that location if none exists. You'd probably want to paint waypoints down at the locations in question and save some information on them, like what strength and variety of trap and so on.
I've tried to do some similar thought exercises about unhiding other types of objects (mostly creatures or placeables) and showing them to some creatures/PCs but not others. Unfortunately, this kind of thing turns out to be very hard to do with nwscript in its current state; detection code and the like is not something that we can easily break into. In most cases (Overland Map "goodies", for example) it turns out to be much simpler to just create the object when you need it, rather than trying to do fancy hide-unhide stuff.
#3
Posté 03 avril 2011 - 09:29
I will have to look into this ,CreateTrapAtLocation. I was under the impression that triggers could be created. Will give it a try.
#4
Posté 04 avril 2011 - 12:08
That did the trick.
I have traps appearing and disappearing as only a sadistic modder can enjoy!
I have traps appearing and disappearing as only a sadistic modder can enjoy!
#5
Posté 05 avril 2011 - 08:25
That sounds like fun - a trap maze..........





Retour en haut






