Author Topic: Need help eventing turret  (Read 680 times)

Thanks for showing intrest :)

Ok, heres the thing... im thinking about making a "escape" map ofsort (inspired a bit by ridrichard) and automated turrets that fire on the players would be a really cool feature.

If possible i dont want to download any more addons to spare any future players the pain to download them so events are more prefered :)

Specifications:
1: Fire from brick or gun
2: Changeable projetiles if possible
3: Automated to aim at players IN SIGHT
4: Fire only when gotten visual
5: Dont move around
6: Fire only at players :)

Everything but maybe not the changeable projectiles is possible(I just don't know how)

well that is good... but it just dont help me if i dont know after all >.<;

Everything but maybe not the changeable projectiles is possible(I just don't know how)
Easily possible.

Easily possible.
Why the hell is there no edit in Help?
I know it's possible, but I usually screw this things up, so I can't help. :c

Why the hell is there no edit in Help?
I know it's possible, but I usually screw this things up, so I can't help. :c
to stop people from clearing the OP

to have it in the line of sight, place bricks around, then name the turret, then on the bricks that you placed on the ground, have
onplayertouch>turret>spawnhomingprojectile[projectile here]

this requires the homing projectile events

Wouldn't that cause a crap load of missles?

If so, here's a way to fix it:

Option A:

Make a floor of invisible plates, when a player touches  it, turn off collision, then turn it back on 1-2 seconds later.

Option B:

Instead of firing with an onPlayerTouch, send a relay t the turret brick and use these events on the turret:

Code: [Select]
[X] 0 [0] onRelay > Self > toggleEventEnabled > [ALL]
[X] 1 [2000] onRelay > Self > toggleEventEnabled > [ALL]
[X] 2 [0] onRelay > Self > fireHomingProjectile > (Projectile)

Option A Details:

Fires projectiles more often when the player is moving
Could cause floor problems
Fires at multiple players

Option B Details:

Fires projectiles at a consistant rate
Uses less output events
Fires one projectile at a time

forgot about that, but option A won't work, as if they stand still it will stop firing

forgot about that, but option A won't work, as if they stand still it will stop firing

True. Option A is a more "nooby" way of doing it. I guess just scrap option A.

to be honest option "a" has caght my attention (mainly because it fires at multiple players) :) but it would be nice with "homing bullet" instead of "homing missiles >.<...

forgot about that, but option A won't work, as if they stand still it will stop firing
Wouldn't that be good?

saying it is a motion sensor would make it a belivable reaction since something need to move ^_^

spawnHomingProjectile fires any kind of projectile at a predicted position from your current speed and acceleration, doesn't have to be a rocket.

The Homing Rocket projectile curves towards where the player but can get laggy if there's more than one.