I don't really understand the "global" parameters listed on most functions.
There's a lot of stuff passed into functions such as where, ppos, sel_ppos, mx, my, etc. Are these global variables that are always available to every function?
I used the mx and my variables without really understanding where they came from to detect the current mouse position, and it "just worked" But I don't fundamentally understand how these really work, and what variables might actually be available for use. Could you explain this and perhaps also provide a list of these globals? (if I've understood that concept correctly, anyway!)
The more I tinker in DSB, the less I realise I understand...
Available global variables/parameters?
Moderator: Sophia
Forum rules
Please read the Forum rules and policies before posting.
Please read the Forum rules and policies before posting.
- Sophia
- Concise and Honest
- Posts: 4239
- Joined: Thu Sep 12, 2002 9:50 pm
- Location: Nowhere in particular
- Contact:
Re: Available global variables/parameters?
No, they aren't global at all.
Those are simply parameters passed to the function. So, the answer as to what is available is-- whatever is being passed. If you were using a rendering function or something that took mx and my parameters, then the function would of course work because it had those parameters.
What I think you're really asking is, "Is there a coherent list of the formal parameters for each of DSB's functions?" and the answer is "not exactly; the wiki has a fairly decent reference, but I'm sure some stuff is missing."
By the way, please don't use yellow text. I use a light background and I can barely read it.
Those are simply parameters passed to the function. So, the answer as to what is available is-- whatever is being passed. If you were using a rendering function or something that took mx and my parameters, then the function would of course work because it had those parameters.
What I think you're really asking is, "Is there a coherent list of the formal parameters for each of DSB's functions?" and the answer is "not exactly; the wiki has a fairly decent reference, but I'm sure some stuff is missing."
By the way, please don't use yellow text. I use a light background and I can barely read it.