Hey! Guest! The 40th (!!!) GMC Jam will take place between February 25th, 12:00 UTC to March 1st 12:00 UTC. Why not join in this very special anniversary jam! Click here to find out more!
Hey coders, I initialise all my global variables in my first page. When i move into a fight i want the if/else statements to allow for me to create a battle system but the global variables are not being updated. (Also to note the global.MonsterSpeed> global.Spd is always called even if Spd is...
Hello, I'll try to explain what I mean, but I have a Input Object (o_input) that has all the controls for the character like:
action_one_pressed_ = gamepad_button_check_pressed(xbox_controller, gp_face1) or keyboard_check_pressed(ord("D"));
action_two_pressed_ =...
Hi! Long story short. My strategy game has multiple 'unit' objects stored under 3 parents: player1_par, player2_par, and cpu_par. The parents are all supposed to attack one another, so that player1_par's children objects attack player2_par and cpu_par, and so on. I can store both the player...
I have a global variable that needs to get the value of other variable, but first it needs to check if that other variable is areadly declared or if it has any value. How can I do this? Thank you.
I have a enumerator with some constants inside, and I would like to show their names in my console, not their values, something like
show_debug_message(getConstantName(parameterHere));
Is that possible? Thank you.
Hi guys, I'm making a space trading and top down simulation game similar along the lines of the Patrician series and somewhere along the code I've run into an issue I'm quite unable to solve by myself. Most of code structure is established by now and all it's left is to assign resource transfer...
Good day,
how can I create a script that automatically prints the name of a variable and its respective value in the debug.
I should just enter the variable in the script.
sorry for the english
i.e:
if vsp = 4
scr_message (vsp);
result;
vsp = 4
ActiveVars
Marketplace: https://marketplace.yoyogames.com/assets/8286/activevars
Category: Extensions
Price: Free
Description:
ActiveVars allows you to link scripts and variables, so that when the variable changes the script is called.
Common uses may include:
* Settings (resolution changes...
I might sound pretty stupid asking this so sorry about that.
But I'm trying to do this:
Player obj walks to vault obj and presses z and it changes (escapedoorlocked = true) - (escapedoorlocked = false)
But it doesn't work for me. So can someone help me?
I'll post code if needed.
Hello, guys. I didn't found any info about it, so I ask it here.
I have character, which can gaim genetic points of 3 types: red_gene, blue_gene, green_gene.
I need to compare all three variables to find the highest of them in case to change color of the sprite to relative one. I know how to...
I'm having a script basically repeat itself to draw text in a certain way but when I try to have it run the text won't be placed right
create
_x[0-3]
_X = 0
script
draw_text(_x[_X], y, "text");
so what happens is the word goes flying across the screen or is stuck in a loop when I program _X...
I´ve got a problem with variables.
When i set global.enemyspeed = 2;, and then into the enemy object-step-alarm[2] = 300;
Alarm2-global.enemyspeed +=2
alarm[2] = 300;
But in the game, the speed is on +2 until next enemy spawns.
When next enemy spawns the speed is again on 2.
The game...
Hey guys,
So I have a shop and points feature in my game.
When the player kills enemies he gets points depending on what type of enemy!
You get ** points per level which reset if you die or leave the level.
When you move to the next level is when the points from your current level get added to...
I'm ill, fuzzy-headed and simply can't see what I'm doing wrong here.
What does 'variable xxx only referenced once' mean?
This is the gamestart event of a controller object. Am I doing something or can I blame it on the latest GMS2 update?
Many thanks,
Hello!
I have a problem with my Project
I can't really explain it here's a video:
All Variable are globalvar's
I am a beginner so sorry if this is a easy problem
See I'm working on a RPG was working on the battle system.
As the title suggests the scene is actually loading in milli-seconds but function called in micro-seconds so the point is that the title might not be so APPROPRIATE to the discussion.
My script:
///@desc battle_enemy
///@arg name...
the title says it all. I've made my player shoot to an enemy whenever he(player) is in the air. It all works great, but I don't like the fact that it will still auto-aim to enemy's that are really far away and out of the view. I've messed with it a bit but I end up creating a error since the...
I looked for the problem and at first i thought is was in the create event but it wasn't, at least not the main problem. and then i tried looking elsewhere like the place it mentions another problem, my draw script. And here it is:
var num = argument0;
for (i = 0; i < num; i += 1) {
if...
i want a script to make all vars of a single object return to what they were in the create event, but with some exceptions like HP, if there is a way to do that without making all variables go to their original state one by one pls tell me
I ve seen some people using those variables like that to store hspeed and vspeed, or "grav" to store gravity value and so on. Why they use those variables?How much is that helpful?