• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Trouble assigning variables to instances.

O

Omninaut

Guest
(Solved then had new problem with new code)
 
Last edited by a moderator:

RollyBug

Member
May sound dumb, but does changing "damage" to "obj_damage" do anything?

Also, welcome to the forum.
 
O

Omninaut

Guest
May sound dumb, but does changing "damage" to "obj_damage" do anything?

Also, welcome to the forum.
Thank you!
I have tried that, It works but I'm trying to avoid it because the variables have to change per instance. The issue is if multiple enemies attack or the player attacks while something else attacks, there could be multiple instances of the damage object and it changes the variables for all of them. So sometimes it crashes because 2 things are assigning different variables to 2 objects simultaneously. Other times one object wins the tug of war and the damage object ignores the other which results in things like an enemy being attacked twice when the player only attacked once, because the enemies own damage object damaged itself because the player won and the enemies damage creator is now the player. its a clusterf*** haha
 

RollyBug

Member
Come to think of it I misread part of your code. This is definitely an interesting way to go about it. Could you show a pic of the exact error message you get?
 
Top