I'm new to GameMaker so I likely don't know much of the terminology, sorry!
In the game I'm making, furniture flies across a room (up, down, left or right) and if it hits the player, they lose health. There's a brief window of time before a piece of furniture flies across the room, during which...
Hello, everyone! I made various custom scripts to build a cutscene system, and they all work perfectly.
The problem is that some of these scripts use the id variable, and therefore give an error when called from another script instead of an object.
When calling the cutscene scripts from another...
Hello, everyone! I have a script that creates a textbox object that uses the variables contained in the instances the player interacts with.
/// Player's Step Event
if press_spacebar = true {
var speaker = collision_circle(x,y,radius,false,false)
if speaker = parent_npc {...
I have two objects oObject1 and oObject2 and one Script myScript.
myScript just returns 0 for testing purposees
function myScript(){
return 0;
}
in the create event of oObject1 I create oObject2 and store its id in the variable obj2. Then I execute myScript in obj2 by using obj2.myScript...
Hi everyone. I've read the manual and am as yet unable to figure out the issue. I have also tried defining the script as a function to no avail. I'm attempting to set up screen transitions via an object controller that uses a script. The script I'm using is called 'fade1'. I'm a first time...
When i press the mouse button it uses both of my choose values and not just one. I am trying to call scripts
step event:
if mouse_check_button_pressed(mb_left)
{
choose(scrattack1(),scrattack2());
}
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...
hey yall,
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.
SCR_BMENU
///placeholder
switch (mpos)
{
case 0:
{//...
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.
TL;DR
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:
Event code:
//create vertex buffer
//call script to add positions, colours etc.
//call script to add positions, colours...
Hi guys,
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...
Hi all!
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...
draw_set_alpha(...);
...
draw_set_alpha(1);
ini_open(...);
...
ini_close();
surface_set_target(...);
...
surface_reset_target();
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...
Hello,
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...