Page 1 of 1
Teleport Weapon Code
Posted: Tue Sep 06, 2011 10:19 am
by Noobasaurus
Alright, I was wondering
how and
if you could make a weapon that when you use it it goes straight down:
And then smoke comes up as the explosion and you instantly teleport somewhere near.
So...is it possible as just a weapon or no?
EDIT: I found
this thread that has the same thing. Now I wondering what that teleporting code in the lua and the weapon's odf might be.
Re: Teleport Weapon Code
Posted: Tue Sep 06, 2011 8:51 pm
by Firefang
Use the same teleporting code but have OnObjectDamage rather than OnEnterRegion.
Re: Teleport Weapon Code
Posted: Wed Sep 07, 2011 12:36 am
by DarthD.U.C.K.
the topic you linked is about teleporting once something is damaged/activated. as far as i understand you want a teleportweapon that can be used anywhere and teleports the player to a random position close to his current positions?!
Re: Teleport Weapon Code
Posted: Wed Sep 07, 2011 9:31 am
by Noobasaurus
DarthD.U.C.K. wrote:the topic you linked is about teleporting once something is damaged/activated. as far as i understand you want a teleportweapon that can be used anywhere and teleports the player to a random position close to his current positions?!
Yes. There would be a bunch of nodes or something in a certain place he would be and when he uses the weapon he would teleport to one of those.
Re: Teleport Weapon Code
Posted: Wed Sep 07, 2011 12:13 pm
by DarthD.U.C.K.
uh, that will be quite a bit of code, youll have to compare the players location to the nodes and find the nearest one.
Re: Teleport Weapon Code
Posted: Wed Sep 07, 2011 6:20 pm
by Noobasaurus
DarthD.U.C.K. wrote:uh, that will be quite a bit of code, youll have to compare the players location to the nodes and find the nearest one.
Well I just want it to be
any of those nodes, not the nearest one. When they use it they will be near all of them.