Gamestudio Links
Zorro Links
Newest Posts
Purchase A8 full licence version
by ukgamer. 08/30/26 14:27
ZorroGPT
by TipmyPip. 08/29/26 06:56
Retrieve optimize() variables order (edited)
by NorbertSz. 08/25/26 13:24
Max Number of Strategies in /Strategy folder
by Martin_HH. 08/17/26 07:54
Pause button for evaluation shell?
by AndrewAMD. 08/13/26 17:16
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 08/10/26 12:46
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
3 registered members (Quad, ugofx, vince), 5,046 guests, and 9 spiders.
Key: Admin, Global Mod, Mod
Newest Members
riggi89, shuhari, KD1990, Student_64151, Koti
19230 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