Charge up bar

For questions about using Classic.

Post » Fri Jun 19, 2009 5:34 am

When you have your screen scroll centered on an object, and that object is destroyed, how would
you reset the screen back to its starting point from where it scrolled from to start with?

edit: Found ashley's tutorial on the animation bar, extremely helpful!

Once that is figured out, would I have to use scripting to change the acceleration
value of my object?

I know this is will most likely be answered quite simply, and I am still skimming through tutorials
to figure out what I can.

Thanks for your time,
Twinsen
B
3
G
3
Posts: 16
Reputation: 907

Post » Fri Jun 19, 2009 8:11 am

[quote:ll8q733i]Once that is figured out, would I have to use scripting to change the acceleration
value of my object?[/quote:ll8q733i]

what object?
I thought you destroyed it?
Spriter Dev
B
87
S
21
G
12
Posts: 3,240
Reputation: 16,461

Post » Fri Jun 19, 2009 5:17 pm

in this case its a cannon ball that is launched and the screen will center view on it
and follow it till it lands then I have it set to destroy itself, now if the user wants
to fire a new cannonball back from the beginning where the cannon itself is still sitting.
B
3
G
3
Posts: 16
Reputation: 907

Post » Fri Jun 19, 2009 8:53 pm

After working a bit more on this, here is what I came up with to kind of give you
an idea on what im working on.

http://sites.google.com/site/twinsonian ... edirects=0

Edit: Oh, sorry, to charge up the cannon fire use "Spacebar"

and, yes I understand the graphics are pretty terrible =) I am not much of an artist, but I threw together what I could to illustrate what I am technically going for.
B
3
G
3
Posts: 16
Reputation: 907

Post » Fri Jun 19, 2009 9:21 pm

scroll back to cannon?

btw you use "center view on me" attribute on cannon.

You can instead use events to center camera on something.
For example:
System[Always] -> System - Scroll to X To Cannonball.x

you can then disable this event and enable this
System[Always] -> System - Scroll to X To Castle.x

Try Deadeye-s Platform school tutorial, he explains scrolling in Chapter 3
viewtopic.php?f=8&t=2154


oh and I gave just a glance to your event sheet, and I think there should be easier way to do whatever you are trying to do without writing 65 events manually just to increase Speed.

you could use timer maybe? or maybe there is some way to get current frame. or maybe some math?
your starting point is value of 50 at frame 1, you add 5 to speed per every frame.
so maybe speed = 50+ Currentframe*5
if there is no built in function to get current frame... you know how many frames are played per second you could use timer maybe.
dunno but there must be a way to automate this, otherwise its just cruel :mrgreen:

oh and BTW, if you hit space while cannon is in the air, you can "fire" it again. try adding some trigger so player can't use space while ball is in the air :mrgreen:


EDIT: I just noticed you painted 60 frame animation for action bar, maybe you could use tiled background instead?
you can change height and width of tiled background in construct. you could place 0 width red tiled background on top of "empty" action bar graphics, then increase height of Tiledbackgound while player holds space button, this should create charging up bar effect.
B
24
S
7
G
3
Posts: 138
Reputation: 2,795


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 5 guests