Logic Game SHIP

Show us your completed creations made in Construct 2

Post » Tue Jun 26, 2012 3:21 am

Friends.

I wonder, I'm riding a shooting game, style gradius or R-Type.

The variables of ship speed, frequency of fire, life, etc.. It is best to store the object itself or global variables?

If I create a system level for the shot, for example, I would give a variable set on the ship?
B
37
S
8
G
4
Posts: 85
Reputation: 5,099

Post » Tue Jun 26, 2012 4:36 am

If you want the stats to stay between levels, you should make it global or store it in web storage (but if a player declines web storage, it wont save anyway).

Otherwise, give the variable to the ship sprite (unless you change sprite objects when ships are upgraded)
"Construct 4 lets YOU make advanced games! (maybe)" Construct Classic - Examples Kit
B
86
S
28
G
13
Posts: 2,092
Reputation: 15,009

Post » Tue Jun 26, 2012 3:32 pm

A but if I want to save it, for example mobile, how should I save this data?

Thanks for your help.
B
37
S
8
G
4
Posts: 85
Reputation: 5,099

Post » Tue Jun 26, 2012 4:36 pm

o.o you can't save on mobile , these data saved with webstorage (like cookies on browsers) so it will be saved there , he want to tell you if the game is having waves every wave getting more harder than the older one you should use global variable but if not waves use sprite.variables

for example you have sprite called ship and has (8 frames = 8 kinds of ships) and you made sprite variables so now you have variables like this (speed attack,speed move,hurt,life,...)
so in event sheet you will do this:
event1
condition:sprite:compare frame = 0
action: put speedmove = 10 , put lifes = 2, put hurt = 1 , put.....
event2
condition:sprite:compare frame = 1
action: put speedmove = 50, .....
and so on in all frames so in this way you just put ships and they will have thier own powers they will not get stronger anymore (this way for no waves games)
B
45
S
15
G
6
Posts: 795
Reputation: 11,935

Post » Tue Jun 26, 2012 8:14 pm

The right, then the webstore, also serves to mobile. I use Webstore to save the jogadador nivels which has passed in each score, time on each screen?
ex:
LvlNext = 20
pointsLvl20 = 1050

WebStore accepts array?

In the case of mobile, the webstore lasts until the player to clear the cache of the phone?

To save the information in a DB, you would send this data via a page asp / php etc? have any tutorial of that?

Thanks for your help.
B
37
S
8
G
4
Posts: 85
Reputation: 5,099


Return to Completed Creations

Who is online

Users browsing this forum: No registered users and 3 guests