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 (Dico), 16,767 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
Variables turning into one another #417326
02/11/13 16:07
02/11/13 16:07
Joined: Dec 2009
Posts: 361
R
rtsgamer706 Offline OP
Senior Member
rtsgamer706  Offline OP
Senior Member
R

Joined: Dec 2009
Posts: 361
so I have two variables using skill2, and for some reason they are the same thing.
in my entity I have:

my.knockback = 0;
my.health = 8;

but when I run a debugvar for knockback, it gives me 8, and goes down when he takes damage.
and if I hit the character so that knockback gets set to 1, he won't die.
It's as if they are always equal and I really don't know why...
Please let me know what part of the code you'd like to see, or if I'm just not understanding skill2
thanks
rtsgamer706

Re: Variables turning into one another [Re: rtsgamer706] #417328
02/11/13 16:14
02/11/13 16:14
Joined: Nov 2007
Posts: 2,568
Germany, BW, Stuttgart
MasterQ32 Offline
Expert
MasterQ32  Offline
Expert

Joined: Nov 2007
Posts: 2,568
Germany, BW, Stuttgart
two variables using skill2
what exactly do you do here?

Is it like this?
#define knockback skill2
#define health skill2


Visit my site: www.masterq32.de
Re: Variables turning into one another [Re: MasterQ32] #417329
02/11/13 16:22
02/11/13 16:22
Joined: Dec 2009
Posts: 361
R
rtsgamer706 Offline OP
Senior Member
rtsgamer706  Offline OP
Senior Member
R

Joined: Dec 2009
Posts: 361
yeah, at the top of the program I have those two lines exactly

Re: Variables turning into one another [Re: rtsgamer706] #417331
02/11/13 16:30
02/11/13 16:30
Joined: Jan 2002
Posts: 4,225
Germany / Essen
Uhrwerk Offline
Expert
Uhrwerk  Offline
Expert

Joined: Jan 2002
Posts: 4,225
Germany / Essen
Well then they actually ARE identical.
Code:
#define health skill2

will actually replace any occurence of "health" by skill2. Please reread the manual concerning the precompiler.


Always learn from history, to be sure you make the same mistakes again...
Re: Variables turning into one another [Re: Uhrwerk] #417333
02/11/13 16:35
02/11/13 16:35
Joined: Dec 2009
Posts: 361
R
rtsgamer706 Offline OP
Senior Member
rtsgamer706  Offline OP
Senior Member
R

Joined: Dec 2009
Posts: 361
alright, I got it now, thanks


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