Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (TipmyPip), 18,546 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 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,377
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,377
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,377
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,377
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 | 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