Gamestudio Links
Zorro Links
Newest Posts
Executing Trades on Next Bar Open
by vicknick. 06/13/24 08:51
Zorro Beta 2.61: PyTorch
by jcl. 06/10/24 14:42
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
0 registered members (), 1,280 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19059 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
lvl change and variables #421818
04/25/13 19:10
04/25/13 19:10
Joined: Apr 2012
Posts: 106
G
GaniX Offline OP
Member
GaniX  Offline OP
Member
G

Joined: Apr 2012
Posts: 106
hello people
I wanna know if anyone can help me with the next problem:

I'm doing two games: 1 rpg and 1 fps

the problem i have is the next

when I change the level, what can i do to keep the number of levels of magick of palyer or any companion for example or munitions of any gun available, and do not be default again

Re: lvl change and variables [Re: GaniX] #421829
04/25/13 21:08
04/25/13 21:08
Joined: Jan 2002
Posts: 4,225
Germany / Essen
Uhrwerk Offline
Expert
Uhrwerk  Offline
Expert

Joined: Jan 2002
Posts: 4,225
Germany / Essen
Temporarily store them in a global or local variable.


Always learn from history, to be sure you make the same mistakes again...
Re: lvl change and variables [Re: Uhrwerk] #421917
04/27/13 23:38
04/27/13 23:38
Joined: Apr 2012
Posts: 106
G
GaniX Offline OP
Member
GaniX  Offline OP
Member
G

Joined: Apr 2012
Posts: 106
yes i was thinking in use an array but if i use array or variable global or local... i have to much code and variable.
is there any other way to do more easy and re-usable?

Re: lvl change and variables [Re: GaniX] #421920
04/28/13 00:08
04/28/13 00:08
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
Originally Posted By: GaniX
i have to much code and variable.
Why would you have too much code? Only one line:
Code:
var player_experience = 0;

Thats all, after you change the level, it will stay the same. Whats the problem?


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: lvl change and variables [Re: 3run] #421922
04/28/13 01:37
04/28/13 01:37
Joined: Apr 2012
Posts: 106
G
GaniX Offline OP
Member
GaniX  Offline OP
Member
G

Joined: Apr 2012
Posts: 106
suppose maybe also have to save ammunition, different levels of magic (magic level 30 different) and 6 or 7 companions

Re: lvl change and variables [Re: GaniX] #421927
04/28/13 09:36
04/28/13 09:36
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
One array then, to save them all, still I can't see the problem. Maybe you describe it more??


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: lvl change and variables [Re: 3run] #421933
04/28/13 12:29
04/28/13 12:29
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
If you are talking about saving all the player's skills, like

#define mana skill20
#define health skill21

and so on, you can still use the array approach easily because you can access the skills the same way:

for(i = 0; i < 100; i++) my_save_array[i] = player.skill[i];


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: lvl change and variables [Re: Superku] #422205
05/04/13 20:10
05/04/13 20:10
Joined: Apr 2012
Posts: 106
G
GaniX Offline OP
Member
GaniX  Offline OP
Member
G

Joined: Apr 2012
Posts: 106
yes thanks to all


Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1