Active Reload System

For questions about using Classic.

Post » Sun Jan 15, 2012 5:54 pm

Hi guys,

I am currently trying to develop an active time reload system for a game idea (think gears of war active reload). Currently I got it to work well by pressing a sprite button but I have hit a problem of some sort.

Basically if I used sprites as buttons, the 'refresh' of the buttons are very quick and button like, enabling me to toggle it quite fast. But every time I try to stop it seems to lag behind, requiring some trials and errors and predicting where it will land with that half second lag before stopping.

The other solution was using a text to do the button toggling and at first it seems to work well, but it seems the 'refresh' of the button is causing some issues. It takes about almost a second before I can toggle the state of the text button.

Here's an image to illustrate the problem. I have also uploaded the cap in case anyone is interested.


Thanks alot for taking your time on this. Any help and advice is much appreciated!
Posts: 108
Reputation: 5,744

Post » Fri Jan 20, 2012 8:33 am

I have changed the 12.event to this:

+ System: Always (every tick)
-> scroller: Add 300 * TimeDelta to 'scrollSpeed'
-> scroller: Set X to lerp(scrollBox.Value('scrollStart') , scrollBox.Value('scrollEnd') , sin((scroller.Value('scrollSpeed')+1)/2 ) )

Looks like its only working well with the sprite, the button still has the ~0,5s delay.

Btw when you use the "else" statement the other conditions are doesnt matters, so lets say, if you want to check a variable, you should do it like this:
if a > 0:
-do this
if a < 0:
-do that
-do something else

So if a isnt higher than 0, and a isnt lower than 0, then it'll do what you "said" in your else loop, but only in that case.Pecek2012-01-20 08:47:50
Posts: 127
Reputation: 2,481

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 5 guests