Beam Skill Demo

by Spunky_Girl
A short and simple way of creating beam-like verbs for your game(s)! :D
ID:64714
 
This beam demo shows you how to use two built-in procedures of the DM program to make a simple Beam-like verb.
Not a bad demo.

But, it can use some work, yet.


For example, to delete the trails of the beam you don't need to loop in the world to find the beam's trails, why not simply add them to a list and then do a loop in that list?


Also, about how you create the beams .. you can save the third argument by using dir = o.dir .. instead of a third argument to send the dir variable.
Danny Kenobi wrote:
...to delete the trails of the beam you don't need to loop in the world to find the beam's trails, why not simply add them to a list and then do a loop in that list?

Not a bad idea, I'll definitely think about it.

Also, about how you create the beams .. you can save the third argument by using dir = o.dir .. instead of a third argument to send the dir variable.

That, however, is a bad idea, since upon creation (using your method) if the "owner" is facing a different direction, then the trail(s) will face that way as well. With a placeholder variable, it will remain constant.
Spunky_Girl wrote:
Danny Kenobi wrote:
...to delete the trails of the beam you don't need to loop in the world to find the beam's trails, why not simply add them to a list and then do a loop in that list?

Not a bad idea, I'll definitely think about it.

Also, about how you create the beams .. you can save the third argument by using dir = o.dir .. instead of a third argument to send the dir variable.

That, however, is a bad idea, since upon creation (using your method) if the "owner" is facing a different direction, then the trail(s) will face that way as well. With a placeholder variable, it will remain constant.


actually my idea is better .. the only problem would be on the following line:

if(T2) new/obj/Beam/tail(T2,Owner,dir)


and it can be fixed, by setting the tail direction equals de head direction. considering the owner variable won't be needed there if you add the tails to a list =D