Sword Game Help :)

butterbeanbutterbean Member Posts: 4,315
edited November -1 in Working with GS (Mac)
Has anyone created a sword game yet?

I did use the search function and saw a posting on it, and from what I gathered, you have your actor with his sword, bit you have an invisible actor constrained to the position of the sword so when it moves, it goes with it?

So when creating the actor itself, you have the actor holding the sword, and the sword isn't a separate image right?

But how would you constrain the invisible actor's position to the sword when it's swinging if it's part of the image?

Sorry! Newbie to this, and never attempted to program a sword game

Comments

  • scitunesscitunes Member, Sous Chef Posts: 4,047
    seems like you could just have the invisible actor constrained to the front half of the main character. Then you have a rule that says when stab button is pressed and bad guy overlaps with invisible actor destroy bad guy. Then in the main character have a rule that says when stab button is pressed animate. that way when a bad guy overlaps with the invisible actor and the button is not pressed the bad gad is not killed and there is no stab animation, but when the the bad guy overlaps with the invisible actor and the button is pressed he will die and there will be a stab animation. This seems like the easiest way to do it but I have not tried this yet. When I get to a game like this, I plan to try this approach.
  • butterbeanbutterbean Member Posts: 4,315
    Sounds like a good approach, just not sure if this is the "best" way to do it, sounds like there could be problems detecting collision for one, but I'll have to test it out soon and I'll let you know how it works!
Sign In or Register to comment.