631
Scripting / Re: Problem plugin - Random
« on: September 07, 2018, 06:34:02 PM »
@jedione I think I know what you are talking about. It’s possible. Send me a video just to be sure.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
That is actually a good idea, keilmillerjr!
Would, maybe, be a little overkill on my current layout/support apps setup but surely deserves a thought.
Still curious about passing arguments, tho. Seems to be an useful feature.
so :: it indicates a global variable ... interesting, thanks.
Global variables are stored in a table called the root table. Usually in the global scope the environment object is the root table, but to explicitly access the global table from another scope, the slot name must be prefixed with '::' (::foo).
exp:= '::' id
For instance:
function testy(arg)
{
local a=10;
return arg+::foo;
}
accesses the global variable 'foo'.
However (since squirrel 2.0) if a variable is not local and is not found in the 'this' object Squirrel will search it in the root table.
function test() {
foo = 10;
}
is equivalent to write
function test() {
if("foo" in this) {
this.foo = 10;
}else {
::foo = 10;
}
}
Looks great! We can incorporate this feature to the plugin as optional and fade after loading screen is shown for a specific time.?
I use this plugin in AM PC, but when I start the game I get a black screen, and there is no image of the game.
Can you explain more about the plugin?