I’d like to trigger the enemies into action when my player character goes above a certain height...y value. Inversely I’d like the enemies to stop when dropping below this value. My first attempt used a planeas a collision object that sent a signal to the enemies. This half works but I don’t know how to then disable the enemies when passing back down through the plane. I don’t see a simple ‘if’ node that checks an assets position. How would I script this? Many thanks....from a new boxer
Thanks so much for your reply. I'm new to JS so implementing this is proving tough. I tried customising the 'limit position' node etc as a starting point to understanding it. I think my logic is close but my lack of JS formatting knowledge leads to a lot of errors thrown. Basically I want a node that says... IF character Y position is greater than 10 then SEND signal. Sounds simple but several full days later I'm still nowhere as scripts have to be so perfect. Anyways thanks for the bone above, I'll keep trying
add output add this line on update function if(this.entity().position().y > 10){ this.emitSignal ('ouput name' , true); } this will give you an output signal but it's updating signal so if you want to limit it you have to set some variables
So in the case of a default ‘send’ node I should change ’output name’’ for ‘something’.... is that correct? Thanks
Any chance you can show me what this one line script node looks like when actually finished so I can understand what I’m aiming at. The default blank script node is full of functions that I’m not sure whether I need to enhance or ignore. Thank you so much
no, it's an output signal,on the right list under node name if you want to set Send and receive node if(this.entity().position().y > 10){ Event.fire('event groub' + 'event name' , true); } event group and event name are the send and receive attributes