Sword Beam

You must understand the Game Editor concepts, before post here.

Sword Beam

Postby DrakeStoel » Wed Jul 01, 2015 8:48 pm

I've been working on a game recently, and I've been wanting to implement a sword beam attack. I have the regular sword attack set up with a "dir" variable, to tell the actor which direction he is facing (0 = up, 1 = left, 2 = down and 3 = right), and then the sword is created each time the "x" button is pressed, the direction it is facing depending on the "dir" variable. Now that all works fine. My question is how to make a separate beam to shoot out of the sword, fly for a while, then destroy itself with a separate animation (which is the same for all four directions), while being able to continue slashing --without more beams shooting-- until the other beam has been destroyed, by hitting a wall or enemy, and so forth. Thanks for anyone's help in advance!
DrakeStoel
 
Posts: 43
Joined: Wed Oct 03, 2012 8:53 am
Score: 2 Give a positive score

Re: Sword Beam

Postby ZeldaFan » Mon Jul 06, 2015 2:24 am

makes a video or post a picture detailing WHAT YOU want.
ZeldaFan
 
Posts: 31
Joined: Sat Jul 04, 2015 5:38 pm
Score: 12 Give a positive score

Re: Sword Beam

Postby knucklecrunchgames » Mon Jul 06, 2015 4:29 am

@DrakeStoel

Hi there. Is this what you mean by a sword beam?

Image

If so, I can kind of help you.

Now I'm afraid I won't be able to help you out code wise as it has been a long time since I used this tool myself and I am slowly getting back into it.

What you would need to do is when dir equals up, down, left, right the beam would go those directions, for example,

If dir = 0 and x is pressed - create beam up
If dir = 1 and x is pressed - create beam left
If dir = 2 and x is pressed - create beam down
If dir = 3 and x is pressed - create beam right

Now for each beam, would have a certain code that would go like this, you wouldn't need a separate animation to destroy it, just a timer and destroy actor.

beam up - yvelocity = - 10;
beam down - yvelocity = +10;
beam left - xvelocity = - 10;
beam right - xvelocity = + 10;

Each beam would also have a timer, and when time is up, the beam would destroy itself.

During that time the beam is created, you could disable down keys and when each beam is destroyed, they would be enabled. Although disabling all down keys would stop you from combos (I'm not sure on how to disable certain keys myself.)

Again, please excuse me from terribly describing that and again as I believe this was my first time helping some one on this forum, I am sorry I cannot write up a code for you. Perhaps a much more advanced user could translate what I said into a .ged for you.






@ZeldaFan Well, that sounded very demanding. You should take time to understand another's question.
User avatar
knucklecrunchgames
 
Posts: 1071
Joined: Wed Nov 21, 2012 8:01 pm
Location: In gameEditor.exe
Score: 17 Give a positive score

Re: Sword Beam

Postby DrakeStoel » Sun Jul 26, 2015 4:08 pm

That IS very much what I want knucklecrunchgames. And I think I understand what you're trying to say. I'm not at my working computer right now, but I'll try and put it into code when I get to it, then tell you how it goes!
DrakeStoel
 
Posts: 43
Joined: Wed Oct 03, 2012 8:53 am
Score: 2 Give a positive score


Return to Advanced Topics

Who is online

Users browsing this forum: No registered users and 1 guest