Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
3 registered members (AndrewAMD, Grant, Neb), 908 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Skills question #5391
07/08/01 07:36
07/08/01 07:36

A
Anonymous OP
Unregistered
Anonymous OP
Unregistered
A



Can someone please explain skills to me? What are they? What do they do? What is their purpose?

Re: Skills question #5392
07/08/01 08:07
07/08/01 08:07
Joined: Mar 2001
Posts: 1,825
London, England
Keith B [Ambit] Offline
Expert
Keith B [Ambit]  Offline
Expert

Joined: Mar 2001
Posts: 1,825
London, England
Hi,

This is something that confused me for ages, especially coming as I did from 3D RAD (which only uses variables). If you see the post below ("skills and variables - please help!"), you'll see that they still confuse me occasionally. But basically, this is the answer:

A skill is pretty much the same as a variable, except for the fact that skills can be assigned to particular entities etc. That is, skills remain local whereas variables are global. In other words, if you have a function that you want several characters to use, you will want to use skills more than variables. ie:

variable += 1; //this will apply to ALL entities or whatever that use the variable...

my.skillx += 1; //this will ONLY apply to whichever entity is accessing the function at the time.

For instance, the problem I was having recently was that I was trying to get two characters to use the same function. Because I had used too many variables, though, if I pressed the "up" button for one, they both moved forward. But by replacing a number of the variables with skills, this was solved.

Sorry, this is a really bad explanation: I embarked on trying to explain this knowing that I knew the difference, but tyring to explain it has turned out to be difficult...
Keith


Re: Skills question #5393
07/08/01 08:12
07/08/01 08:12

A
Anonymous OP
Unregistered
Anonymous OP
Unregistered
A



would i be correct in saying that skills are just local variables?

Re: Skills question #5394
07/08/01 08:42
07/08/01 08:42
Joined: Mar 2001
Posts: 1,825
London, England
Keith B [Ambit] Offline
Expert
Keith B [Ambit]  Offline
Expert

Joined: Mar 2001
Posts: 1,825
London, England
Yup, that's pretty much it. They're always preceded by a synonym, eg. my.skill1, you.skill1, player.skill1, ohmygodtheykilledkenny.skill1 etc. So you could have four characters accessing a skill (all being "my" when they use it), but to do the same with a variable you would need four variables (and probably four functions), as if one entity changed the variable it would be changed for all the other entities too...

Sorry, I might be better at explaining had I not just back in from the pub.
Cheers,
Keith



Moderated by  HeelX, Spirit 

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