Aller au contenu

Photo

Arpharazons traps


  • Veuillez vous connecter pour répondre
5 réponses à ce sujet

#1
PJ156

PJ156
  • Members
  • 2 982 messages

In the next cornucopia release I want to include scripts for Arpharazons traps.

 

I though I could do something myself but I can't :(

 

I am trying to trigger one to start animating like this:

 

   oTarget = GetObjectByTag("06_pl_05_saw_1");
 
   AssignCommand(oTarget, PlayAnimation(ANIMATION_PLACEABLE_OPEN, 1.0f, 0.0f));
 
I also need to be able to trigger on to stop animating. I reckon if i can't get one to start i have little chance of getting one to stop.
 
Has anyone written scripts for these traps?
 
PJ


#2
kamal_

kamal_
  • Members
  • 5 240 messages
I havnt, but you'd probably want to GetNearestObjectByTag or put the tag as a local variable of the trigger so the object could have a different tag.

#3
Tchos

Tchos
  • Members
  • 5 042 messages

Not yet, but I plan to use at least one of them in a dungeon crawl.



#4
Lance Botelle

Lance Botelle
  • Members
  • 1 480 messages
Hi,
 
Yes, I have and I have most of them in my module now.
 
The problem is, my scripts are very specific and apply to other code in my module. Furthermore, you need to be aware that there are quite a few other things you need to consider writing to make them work logically. E.g. Is the PC in the "trap" area ... needs a trigger to check a variable, etc. Also, triggering dual animations may need to be considered. like I did.

Here is the animation line I use:

AssignCommand(oTrapSource, PlayAnimation(ANIMATION_PLACEABLE_OPEN));

BALL USES: AssignCommand(oTrapSource, PlayAnimation(ANIMATION_PLACEABLE_ACTIVATE, 2.0));

I believe this is my "stop" line (which I also use for some "single shot" applications):

DelayCommand(fDelay, AssignCommand(oTrapSource, PlayAnimation(ANIMATION_PLACEABLE_CLOSE)));

You need to write around your specific requirements.

Regards,
Lance.

#5
4760

4760
  • Members
  • 1 204 messages

You should also consider the traps which cannot be restarted... Blades coming out from walls could be neverending (with springs and weights for examples), but balls coming from the ceiling have to stay hanging after the trap has been fired. I use an integer variable "bAlreadyTriggered" for that: if it equals 0, it's not be triggered, so play the OPEN/ACTIVATE animation, and set bAlreadyTriggered to a non-zero value. If it's not equal to 0, then exit (the trap has worked already).



#6
PJ156

PJ156
  • Members
  • 2 982 messages

Thanks all I may give this some more time later.

 

Look like the scripts that Lance uses are pretty much similar to mine so I must be doing something else wrong. I have a rule though. If something is not critical to the plot, or how I must have things happen, it gets two hours, that's the lot ... move on.

 

My time at the PC get less and less and is too precious to spend a lot of time on things I do not really need.

 

To do justice to your time and responses I will give it one more go :)

 

Thanks all,

 

PJ


  • GCoyote aime ceci