Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Help Variable Prefix
RaideX Offline
Member

Posts: 212
Threads: 33
Joined: May 2013
Reputation: 7
#1
Variable Prefix

So yeah. Basically what the title says:

when i use a callback syntax in my scriptfile like this:

PHP Code: (Select All)
OnStart {
AddEntityCollideCallback("Player""HatchEvent""HatchEvent"true1);
}

void HatchEvent (string &in asParentstring &in asChildint alState

When the script is executed the variables asParent, asChild and alState are getting replaced by the function that calls the syntax above.

Now to my question, what excectly does "alState" mean. State is self explanatory, that is for sure, but what does the "al" before that mean. With "as" it's quite easy. But the other one is a mystery to me!

(I know that these variables can be replaced by everything else variable wise, but i'd really like to know what the normal variable names mean)

Hope you'r getting my point here.

-RaideX

If you don't draw first, you don't get to draw at all... -The False Shepherd
12-07-2013, 04:26 PM
Find
Daemian Offline
Posting Freak

Posts: 1,129
Threads: 42
Joined: Dec 2012
Reputation: 49
#2
RE: Variable Prefix

As a programmer, I think al in alState stands for alternate cause it changes. (between -1, 0 and 1).
Just a guess, only FG know the real truth.

12-07-2013, 06:21 PM
Find
Adrianis Offline
Senior Member

Posts: 620
Threads: 6
Joined: Feb 2012
Reputation: 27
#3
RE: Variable Prefix

Not sure exactly what the 'a' is (possibly meant to just be a, as in 'a string', although Amns suggestion sounds pretty reasonable), but 'l' is probably for long, which is an integer type in a number of languages
as - string
al - long
ab - bool
af - float

I usually just use my own, str in bl & fl to append the parameters

(This post was last modified: 12-11-2013, 06:10 PM by Adrianis.)
12-11-2013, 06:08 PM
Find
Apjjm Offline
Is easy to say

Posts: 496
Threads: 18
Joined: Apr 2011
Reputation: 52
#4
RE: Variable Prefix

I've always interpreted it as a style of hungarian notation, indicating information about the variable. In this case the 'a' is probably for angel-script (as this style was used in penumbra scripts too) and s/l/b/f etc are for the type.
(This post was last modified: 12-11-2013, 07:47 PM by Apjjm.)
12-11-2013, 07:43 PM
Find
Daemian Offline
Posting Freak

Posts: 1,129
Threads: 42
Joined: Dec 2012
Reputation: 49
#5
RE: Variable Prefix

You're totally right. Forget what I said.

12-11-2013, 08:52 PM
Find




Users browsing this thread: 1 Guest(s)