I've try to make a simple script that simply increment a number that we pass in the argument. In my object i call this script function every step and the variable is crate in the create section and not in the step section. this is my code, the resoult in the console isn't increment and simply...
(I'm not currently in the beta so I thought I'd pose the question here, hopefully someone can help me before the official release!)
So in my current project (a fighting game), I have the ability to save replays and play them back. I have a fast forward feature that lets you play through the...
Is it possible to send a variable to a script for direct writing? I don't mean send the value, modify the value, return the value. I mean send the script something so it knows what variable to update. In other words I want a script to do something based on the values it has been given and...
i don't know if im doing this right but when i want to call my script it gives me a malformed if statement. heres the code below. Whats suppose to happen is when i press enter i want the script to open and replace the other one.
This code is the idle animation of my character when he isn't moving it wil execute this code but after a while the arm_move_down script wont be executed anymore.
if (xmove == 0 && vsp == 0)
sprite_index = player_idle_sp;
image_speed = 0.05;
if (floor(image_index)+1 ==...
Hello! It's pleasure to be a part of the GMC. I'm new to GMS2 but am familiar with game design and programming in general. I'm running into a strange problem I was hoping to get some help on from some of the GMS vets out there.
Basically the issue is there is a specific script that is...
I want to create a set of scripts to draw vertex primitives more easily. So, I want to create a vertex buffer and then call some scripts to put shapes in them. So the idea is:
//create vertex buffer
//call script to add positions, colours etc.
//call script to add positions, colours...
i'm trying to make a script which stes the tiles of a block of wall based on the sprites stored in its array, but somehow when i call this function on the object the compiler tells me that i' m "trying to index a variable which is not an array".
Each block of wall is built at the...
I got a little problem, I got a wander behavior script that if I call it in the step event of my monster doesn't work.
If i do the same code (the whole script) in the step event of my monster it's work fine! The timer var doesnt go down in my script one know why ?
Here' is my script...
I find myself repeating patterns like those above quite often and find it odd that GML does not provide some utility to prevent this sort of repetition when plenty...
I'm working on a visual novel engine. The game has an array of strings that display one at a time for the first scene. What I want to do next is, when the text in one array has all been read, advance the script containing the strings to the next script. The purpose for this is to better...
Hey guys, I added a script to my project and called it in my player object. It gives the oddest error when I try to run the game. I haven't seen this error before and I'm wondering if anyone knows what's causing it.
The Error Message:
In Object obj_player, in Event StepEndEvent action number...
I have a weird effect that's happening on some of my scripts. Here's the first script:
if (scr_craftingcheck(3, 5) = 1)
here's the second one:
if (scr_craftingcheck(4, 1) = 1)
Hey, everyone! Quick question for those who are more knowledgeable/experienced. Is there a performance hit for calling a script rather than just running a given block of code in-line? I have found, in the course of working on my first game, that it is MUCH easier for me to keep code organized...