ID:150002
 
I need help on quite a few things

  • Adding a homing projectile
  • Making the projectile longer than 32

    I have already checked out the S_Missile but i am confused *_*

    Any help would be great
Gojira wrote:
I need help on quite a few things

  • Adding a homing projectile
  • Making the projectile longer than 32

    I have already checked out the S_Missile but i am confused *_*

    Any help would be great

  • Homing projectiles and multi-tile projectiles are much more complex than S_Missile. If you had trouble with that library, you would have twice as much trying to sort out that extra complexity.
In response to Skysaw
Umm, well i understood the code but not how to implement it.
A laser is fine, a long one is fine, but a homing one? Lasers are beams of light, and simply cannot be made to follow a target. I suggest you just stick with a long lazer that shoots and if you miss, sucks to be you.
In response to Lord of Water
that seems fine, sure.
In response to Gojira
how about using step_to()?
In response to Air _King
Well how would i make it longer than just 32 pixels?
In response to Gojira
That would be the major problem. It's possible, but difficult to do things like that. You would have to have multiple iconstates to make the path of the laser look logical, you would have to keep them together and make sure no piece of the laser is hitting something that a laser cannot go through, and all the while make the laser follow the target. It would be quite a job!
In response to Lord of Water
Well, think of it like this. The same sort of laser like in tanks.
In response to Gojira
I've never seen the laser in Tanks, but is it homing?
In response to Lord of Water
no, but the first step would be to make it long would it not?
In response to Gojira
Most certianly:
obj/laser
density = 1
name = "Laser"
icon='laser.dmi'
Bump(mob/M as mob)
del M
oview() << "[M] is killed by a laser blast!"
Bump(turf/T as turf)
src.icon = null
src.density = 0
front
icon_state = "laserfront"
back
icon_state = "laserrear"
mob/verb/shootlaser()
var/laserfront = new /obj/laser/front (null)
var/laserback = new /obj/laser/back (null)
laserfront.dir = src.dir
laserback.dir = src.dir
switch(src.dir)
if(NORTH)
laserback.loc = locate(src.x,src.y+1,src.z)
laserfront.loc = locate(src.x,src.y+2,src.z)
if(SOUTH)
laserback.loc = locate(src.x,src.y-1,src.z)
laserfront.loc = locate(src.x,src.y-2,src.z)
if(EAST)
laserfront.loc = locate(src.x+2,src.y,src.z)
laserback.loc = locate(src.x+1,src.y,src.z)
if(WEST)
laserback.loc = locate(src.x-1,src.y,src.z)
laserfront.loc = locate(src.x-2,src.y,src.z)
else
src << "You must be facing a cardinal direction to fire a laser."
return
var/i = rand(5,9)
var/i += src.laser_skill
while(i)
laserfront.Move(laserfront.dir)
laserrear.Move(laserrear.dir)
i -= 1
spawn(1)
del laserfront
del laserback
mob/var/laser_skill = 0
mob/New()
src.laser_skill += rand(0,2)


This is untested, but play with it a little and see what you can do. Good luck!

-Lord of Water
In response to Lord of Water
Thanks lord i'll see what i can do.