Aller au contenu

Photo

Effect at location ported to?


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

#1
Knight_Shield

Knight_Shield
  • Members
  • 444 messages
I have a book that teleports you to a waypoint where a portal is ..then the portal can teleport you to where you last used the book.

Question: How do you put an effect on PC when they arrive at their destination.Right now I just do the effect twice with delay command ..doesnt always work with different maps taking longer to load .

#2
Mudeye

Mudeye
  • Members
  • 126 messages
You can probably put a trigger at the destination and assign the effect in the OnEnter script.

#3
Knight_Shield

Knight_Shield
  • Members
  • 444 messages
Yes I thought about that but wouldnt it go off when anyone enters?

#4
Mudeye

Mudeye
  • Members
  • 126 messages
Ah I see. Here's a solution for that. When someone it getting ported, set a local variable on the PC called "GettingPorted". Set it to 1. Check for that variable in the OnEnter script at the destination. If you find the variable then set it to 0 and apply the effect.



That way only a PC that is being ported can receive the effect and the variable is set back to 0 when they arrive so they can't trigger it again. Unless they are ported again that is.

#5
Knight_Shield

Knight_Shield
  • Members
  • 444 messages
ahh very good I will try to make em if not I will post my script so you can help ...thanks


#6
420

420
  • Members
  • 190 messages
On my server, if the PC is teleporting into another part of the same area I just apply the "teleport in" effect with a set delay but if the PC teleports to a different area I run a pseudo-heartbeat script that checks every second to see if the PC is in a valid area using GetIsObjectValid() with GetArea(). While the PC object is transitioning it will return an invalid area, as soon as the area becomes valid have the heartbeat script apply the VFX.

-420

Modifié par 420, 14 octobre 2010 - 12:26 .


#7
ffbj

ffbj
  • Members
  • 593 messages
Some what of a side note: I had an area, 'The Fortress of Iron' which had multiple teleporters in it. Once the PC teleports to a random location in the area they could look and see the teleportation effect going off at the location they just teleported from. Sort of an orientation cue. It was also really cool to look back and see the effect from a distance. Also I had npc's in the area, chaos warriors who would also use the teleporters. One of my tougher areas.