DavidN's Custom Platform Movement Help
After I got mostly completed with my recent project, I went into making a platformer-style game. I went through the entire tutorial for DavidN's custom platform movement excepting the Keys and Doors, and the Accel/decel, and I even created my own addition to the movement. Now that I am test running with some new tiles, I came to wonder how can I get my character to go up and down hills and slopes fluidly without stopping or falling. Does anyone know how to incorporate that into the movement?
Also, I want to try a cool Counter effect. Suppose I lay two counters on top of each other, and they are both bar format. The top one is yellow and the bottom one is red. The yellow one has a maximum value of 5, and the red one has a maximum value of 250. What I want to do for instance, is when my character loses health, (the yellow bar) the red bar will count slowly down 50 points. So one counter instantly goes from 5 to 4, and the other counter makes it look cooler by subtracting 50 points one by one until there are 200 left. Is there any way to do this?
Re: DavidN's Custom Platform Movement Help
A. This has been asked before and you could search the forums a bit.
B. Easy, just make events:
Red counter > yellow counter * 50:
-Sub 1 from red counter.
Re Counter < yellow counter * 50:
-Add 1 to red counter.
Re: DavidN's Custom Platform Movement Help
Okay, on B...
The red counter is subtracting fine, and just the speed I want it to. On the other hand, the yellow counter goes away entirely if I even subtract only 1 from it. What can I do to fix this?
Re: DavidN's Custom Platform Movement Help
Make sure you only subtract one from it ONCE. Otherwise it will keep subtracting, which you wouldn't want.
Re: DavidN's Custom Platform Movement Help
EDIT: Turns out, it only wants to play the effect that I want when I make it follow the frame and scroll the frame at the same time. Otherwise, the yellow counter seems to want to disappear into a state of invisibility that I cannot make come back UNLESS it scrolls again. I've looked through the events and could not find the conflictor. Is there an event that I can add to this to make it stable, or should I upload an example to the File Archives?
But on the other hand, for the searching deal, what do I search for? I have looked for a little while now and not found anything... :(
Re: DavidN's Custom Platform Movement Help
EDIT: Well bar counters have ALWAYS had that issue for me. Maybe instead you could use active objects with scaleing them to be the proper width.
Well I just did a search too, I know it happened and was discussed and fixed, because this has come up many times before. I just can't find it again! Anyway, you may need to move some sensors to allow some 'step-up' distance.
Re: DavidN's Custom Platform Movement Help
The active object was going to be my next plan, but it will require a bit of animation and time, which I was attempting to avoid with counters.
That's what I figured I would have to do with the slopes, and I'll get on it!
Re: DavidN's Custom Platform Movement Help
Animation? No, you can set scale in an event and it will render a specific size at realtime. No need to make an animation for every number.
Re: DavidN's Custom Platform Movement Help
Too late for that, I have an totally animated thing going on, and it looks great. Oh well...
Re: DavidN's Custom Platform Movement Help
Try unchecking the "Display as backdrop" property for the counter - I think that will fix the scrolling problem you were seeing.
Re: DavidN's Custom Platform Movement Help
And for the first question, the thread I made for one way of adding slopes to the platform movement is here:
http://www.clickteam.com/epicenter/ubbthreads.php?ubb=showflat&Number=52566
The second attached file in the thread demonstrates it fully.
Re: DavidN's Custom Platform Movement Help
Thanks, DavidN, you're a lifesaver. I already got the counters working fine, but they both work as active objects. It took me a long time to put it all together, so I think I will leave it be unless it becomes completely necessary.
And thanks for the link, I'll be sure to try and implement this ASAP.
Re: DavidN's Custom Platform Movement Help
And great, now I'm having another problem. I am trying to incorporate a movement that allows the character to attack when you press the "Fire 2" button. I have the animations lined up, and the attack would work perfectly, but for some reason, the attack doesn't happen and doesn't display the entire animation before it goes back to the idling, walking, or jumping/falling animations.
Is this because the engine specifically makes your character stand in animation or jump or fall in animation?
Is there a way to work around this?
And is there also a way to make it so that if my character is in the air and I push the attack button he immediately starts to fall?
Re: DavidN's Custom Platform Movement Help
2. Just check for if he's not on the ground, and when the button is pressed, set Y velocity to something like 10.
Re: DavidN's Custom Platform Movement Help
Okay, that's simple enough... Now to figure out how to create a working feature for the attack. I think I know how to do it, but it involves Creating duplicates of all of the gravity and horiz events. If there is a simpler way, that would be great.
EDIT: It also apparently doesn't work with shooting an object either, because it won't change to the shooting animation at all, if only for about a thousandth of a second.
Re: DavidN's Custom Platform Movement Help
Your events are probably overriding the animation that you've set going and immediately switching back to the animations that they tell the player object to go to (for example, if you shoot while standing still in one frame, then when the next frame is drawn the player is standing on the ground and not moving, so the Stopped animation is played).
You can prevent this by adding new conditions to the other animation events - such as "Player animation Shooting is not playing" - to stop them from interrupting particular animations.
Re: DavidN's Custom Platform Movement Help
Okay, thanks, I'll try that.