Placing A Weapon Object

Post Reply
Golde
Posts: 8
Joined: Fri Dec 27, 2019 11:12 pm

Placing A Weapon Object

Post by Golde » Tue Mar 24, 2020 1:16 am

I've started my first NESmaker project, and since I'm a total noob, I'm going for something small and simple. It's supposed to be a game where enemies will walk around the screen and the player places mines on the ground to blow them up. Unfortunately this has proven to be a lot more difficult than I thought it would be lol.

For the time being, my problem is with placing the mines on the ground. I figured out how to do this with the create_melee script, but after the mine gets placed, the game is apparently frozen and won't accept any more input, and the player reverts to facing downward. Here's the code I have, it's been slightly altered from the default script to make it work.

Image + the rest: Image

And here's the object details for the mine in case that's causing the problem.

Image

I'm mainly trying to figure out what's causing the freeze-up, but if anyone knows what might be causing the player's direction to change, that would be much appreciated too.
User avatar
NeoBenj
Posts: 41
Joined: Wed Apr 24, 2019 4:48 pm

Re: Placing A Weapon Object

Post by NeoBenj » Tue Mar 24, 2020 12:38 pm

I don't think it's a code issue. What you describe is more an incorrect facing setting.

It can be in your Animation/Action step tab of your Main character.
Can you take a screenshots of the following screen of your Main Character settings?
-Tab Animation => your attack animation (your issue of facing is in there I think)
-Tab Action => Step 0
-Tab Action => Step 2 (your issue of freeze is there maybe, that you don't GoToFirst(idle) when it’s finished)

Also, I noticed your weapon object setting is: End of Animation = Advance.
It is ok, but be sure to have a non-0 animation speed.
Basically, you ask for advancing step at the end of the animation, but an animation with a speed of 0, will never end. :)
But that is not your current issue. ;) First let's fix this facing problem.
Gluppy Rangers - Official Thread
viewtopic.php?f=51&t=4658
Golde
Posts: 8
Joined: Fri Dec 27, 2019 11:12 pm

Re: Placing A Weapon Object

Post by Golde » Thu Mar 26, 2020 12:28 am

Thank you! You were absolutely right and I was able to fix both issues. The freeze issue was caused because the attack animation wasn't set to GoToFirst, and after I fixed that the facing issue ended too. I didn't really know what these settings in the Action tab meant but now I understand them better. If you know of any resource I can use to see what each of them does specifically, as while as explaining the Action Step Flags, I think that would be very helpful for me in the future. Now I'm looking to see how to change the mine from it's Default setting to it's Explosion animation after a collision. If I understand right, setting the Default step to Advance at the end of the action would be a part of that, but what would I have to do for a collision to cause the end of the action?
Post Reply