Beam Skill Demo

by Spunky_Girl
A short and simple way of creating beam-like verbs for your game(s)! :D [More]
To download this demo for your Linux/Mac installation, enter this on your command line:

DreamDownload byond://Spunky_Girl.BeamSkillDemo##version=0

Emulator users, in the BYOND pager go to File | Open Location and enter this URL:

byond://Spunky_Girl.BeamSkillDemo##version=0

812 downloads
Version v1.0
Date added: Apr 3 2009
Last updated: Apr 4 2009
3 fans
This beam demo shows you how to use two built-in procedures of the DM program to make a simple Beam-like verb.

Comments

Danny Kenobi: (May 4 2009, 12:20 pm)
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
Spunky_Girl: (May 2 2009, 5:59 pm)
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.
Danny Kenobi: (Apr 19 2009, 1:34 pm)
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.