i am working on a map and its close to be beta-playable.
i recently added some huge things to it and now another thing does not work and keeps spitting errors - and i have no damn clue why or what the problem is.
so i hope anyone is able to help here.
i'll add the relevant screenshots as attachement, and i would upload the whole map if its necessary.
what the trigger does is simple, the player has an hero, walks into an region and a dialog pops up with some buttons - with these buttons the player is able to buy attributes for his hero, intellect, strength and stamina.
it worked some days ago, now i added some random choosing for heroes and stuff, and now on dialog button click of these items it spits these errors.
Your "ChosenHero" variable must be global or it won't work. Local variables (the variables created directly in a trigger) should only be refered to by the trigger it was created in. They are only useful when you need to stock something that you use later in the same trigger. In your case, the ChosenHero is something that other triggers need if they want to work properly, so if you don't make it global they won't even know what this variable refers to.
actually thats wrong, with the choosenhero variable i just tell the function inside the trigger what hero it should spawn - that variable is not needed anywhere else, and due to it has to be used for every player at the same time probably it just works perfectly fine.
but i found the solution already, thanks to someone from the irc (big thanks!) - i had to add the "skip remaining actions" to the default part in the switch.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
hey people.
i am working on a map and its close to be beta-playable.
i recently added some huge things to it and now another thing does not work and keeps spitting errors - and i have no damn clue why or what the problem is.
so i hope anyone is able to help here.
i'll add the relevant screenshots as attachement, and i would upload the whole map if its necessary.
what the trigger does is simple, the player has an hero, walks into an region and a dialog pops up with some buttons - with these buttons the player is able to buy attributes for his hero, intellect, strength and stamina.
it worked some days ago, now i added some random choosing for heroes and stuff, and now on dialog button click of these items it spits these errors.
i simply have no idea why or whats causing this.
any help would be very nice.
regards, PatchOne
bump?
Your "ChosenHero" variable must be global or it won't work. Local variables (the variables created directly in a trigger) should only be refered to by the trigger it was created in. They are only useful when you need to stock something that you use later in the same trigger. In your case, the ChosenHero is something that other triggers need if they want to work properly, so if you don't make it global they won't even know what this variable refers to.
actually thats wrong, with the choosenhero variable i just tell the function inside the trigger what hero it should spawn - that variable is not needed anywhere else, and due to it has to be used for every player at the same time probably it just works perfectly fine.
but i found the solution already, thanks to someone from the irc (big thanks!) - i had to add the "skip remaining actions" to the default part in the switch.