something like this...
if (obj.var < 3)
with (obj.var < 3)
obj.var += 1;
I want to make it so:
if (a particular obj with the smallest value of var && that are less then a value of 3)
If you use var to designate a variable is only being used in that script, but someone adds a variable with the same name to the same object (or a child object) that's visible to the rest of the object will there be any bugs?
eg. possibly the script wrongly using the variable that's visible...
So the intention that i have is:
adding -100 to y value, every time the row limit is reached, currently i have
var nmb = 3;
var rowbonus = 0;
if menu[p,i] < menu[p,nmb]
var nmb = +3;
var rowbonus = -100;
Symptoms to Look For
Expand for screenshot:
The error is in the Create Event for object <undefined>.
The subject is <unknown object> with a variable name that's either built-in or known to be already declared.
The stack trace shows the source as something starting with gml_GlobalScript.
This is a create event and when I run the compiler it says that room_type is not set.
also if I directly insert a digit into the argument field, the code works.
var room_type =5;//irandom(559);
// if (up == true) and (bottom == false) and (left ==false) and...
I really searched and found no solution for this simple problem, i must be missing something simple...
In the create event of my object im doing this:
var hp = 10;
Then in the draw event im trying to draw a bar with that var like
draw_rectangle( -50, -40, 100/global.slime_max_hp*hp-50, -30...
Hello GMC, could anybody please help me with something.
How do you create an object with variable set to that object say for example if the code below existed:
key press Z
instance_create_var(x,y,item,var1 = 0 | var2 = 0 | var3= 0)
This is the best way I can think to explain it sorry :) Please...
(In advance I apologize for mistakes in the text) I have a simple stopwatch for game, which is visible in game. The main problem is, that I can't understand how numbers of sec,min,hrs should be shown in another room with results after game completed. There are two stopwatch objects: one for in...
I'm trying to save instance information to ds_list, and everything works well, but some problems with variables.
I want to add variable only if exists and trying something like this:
I'm sure I'm wrong, but how to...
Hi guys sorry to bother you all, I've been googling round for a solution to this but without any luck.
What I'm trying to do is reduce the amount of code needed by using an array of values instead of several if statements.
I have a couple different arrays with similar names (aType, bType...
Coming from Ruby, Java, C#, C++, etc. I'm having a really hard time adapting to GMZ. I like the language for It's simplicity, but I can't get around some scoping problems. Here's the problem I've been having:
local variable tower_hp(100003, -2147483648) not set before reading it...
Pointer is highly conceptual - please only download and use it for testing- and playing-around-purposes in it's current state. However, I'm happy about feedback, bug reports and suggestions! Please use this thread in the GM:S Forum.
Create pointer_vars for a whole new level of dynamic coding...