#issue with creating objects
52 messages · Page 1 of 1 (latest)
This is what happens when the player collides with the spike
The spike itself has no code.
Sorry for crappy photos i dont want to screenshot all of this, it is quicker to use my phone. Also i will not be switching to the built in particle system because i have no clue how to use it and it doesnt fit how my game is gonna look
are you using an actual sequence? a sequence is a specific type of asset in gamemaker, it is not referring to a sequence of events or animation
the very first thing here is "set position of sequ", which I'm guessing is sequence
the error also references layer_sequence_x
Dunno what that means
well thats why I'm asking if you're actually using a sequence asset or not
because if not, you're using the wrong thing
Its an object
then thats the wrong thing to use, you should not be using set sequence position
no, you are not using sequences at all, as mentioned they are a specific asset in gamemaker
you would know if you made a sequence
can't really say, you'd have to explain what it is you're trying to do with this bit of code that you're using incorrectly to better help
It says deathParticle.variable isnt set
What does that mean
I changed it a little bit
thats unrelated because deathparticle is not a sequence
that would make a bit more sense, but only if PlayerX and PlayerY have been set with actual values before
They are
otherwise you'll get more not set before reading errors
well then try it and see what happens
This is code inside the player that happens every step
WAIT I THINK IK WHAT I DID WRONG
i didnt make it global
Now this happens
I didnt make playerX/Y global yet
related to this
variable has not been set with a default value
The only variable inside the particle is the duration
look at the error; it specifically says this is at fault:
if (variable < 1)
that means variable has not been set with a default value in create, or anywhere
if you don't set and initialize variables, gamemaker does not know what they are to do things with them
Ok wait its fixed now
essentially you're doing:
if (undefined < 1)
which would crash