1 decade ago by blast
Loving Impact. Got a quick question for .pressed() though. I've created a few buttons (entities in welt) that I would like to push with the mouse in my game. The problem is, .pressed() seems to only work for the first entity with that assigned action unless I'm missing something?
If I set my mouse left click to an action called "click" and then I give an entity a check for "click" in the update, then put multiple entities on my map... Only the first entity created will respond. I did notice that using .state() does seem to work for both entities, would using state() be the correct way, and then write my own code to prevent 'autofire'?
nefD, I noticed you did something like this in your sweet pipewalk game you just posted, but I'm guessing you did some DOM tricky-ness for that? Got some hints? :)
Thanks for any suggestions!
If I set my mouse left click to an action called "click" and then I give an entity a check for "click" in the update, then put multiple entities on my map... Only the first entity created will respond. I did notice that using .state() does seem to work for both entities, would using state() be the correct way, and then write my own code to prevent 'autofire'?
nefD, I noticed you did something like this in your sweet pipewalk game you just posted, but I'm guessing you did some DOM tricky-ness for that? Got some hints? :)
Thanks for any suggestions!