so if i have a temp variable, i want the even id of the event calling it to return the value of the variable with the same number.
example:
event 1 gets the value of variable 1 and puts it in variable 2
Please explain what you're trying to accomplish (not how you're going about it). Your wording is a bit confusing.
There are no "temp variables" - if you have one we'd need to know how you've created it and how you're using it.
Events don't "call" variables.
Where does variable 2 come from in your example? How does event 1 know to put the value into variable 2?
variable 2 was my temp variable in the example...
so im making a 10x10 grid based puzzle game.
I could program the same thing 100 times but to make less work i figured i could tie the id of the event to the id of a variable.
there are four colors in this puzzle game which are represented by numeric values
1 = red
2 = blue ect.
so i want the event to look at its corresponding variable id to determine what color the event should be
so here is an example of what im trying to accomplish..
lets say
variable 1 = 2
and variable 2 = 1
event 1 needs to look at variable 1 and change to the blue sprite
event 2, however, needs to look at variable to and change to the red sprite
(sorry its confusing)
something like:
if $gameVariables(this.eventId) = 1
then tint red
im just not sure what "this.eventId" would actually be
i am only trying to create the gameboard right now.
so far I have an event randomizing the values of variables 1-100 to be 1,2,3, or 4.
I am now trying to make events display an icon set corresponding to the variables random value.
the game will eventually be played as follows:
a 10 x 10 grid is filled with tiles. (there are 4 different tiles - red, blue, green, purple)
the player will select one tile and all like tiles next to it (up, down, left, and right) will dissapear and award the player points according to how many tiles were in the group.
the tiles above will fall to the bottom and all empty slots on the grid will be replaced with randomly selected tiles. the game will eventually be over after so many points are collected.
sorry for the double post earlier!
No, region IDs won't work in this case - but doing it with general variables like you plan it will also be less optimal.
I think you should focus on the game mechanic before the gameboard - how you select and trigger the point counting event will be more important, and that might cause restrictions on how to define the gameboard handling.
Do you plan to turn the actor into a cursor and have the player walk on the board to trigger the event on each position, or how do you plan to do this?