How to use Player-Counter-Device properly?

Hello!
I want to make the Verse code that if player is inside the zone of Player_Counter_device, Its going to print “Player inside” but it doesnt work at all.
Whats wrong with this code?
Thank you!
image

Your Healing function does not suspend, meaning the loop is basically an infinite loop, it will try to compute your code infinitely in a single frame

Maybe you can try to call a suspending HealingSuspends() function instead and add a Sleep(0.0) inside your loop

Thank you for your reply LAMA
image
I make it not infinite loop but Its still not working…
I shoudnt use IsCounted?
When I enter the device its shows like this↓
image

Yup it’s strange, maybe you can subscribe to this function instead of using IsCounted :

# Sends the `agent` that is no longer being counted.
RemovedEvent<public>:listenable(agent) = external {}

Sorry for many question.
Is there any way to break the looping of other method?
image

If I subscribe the HealingStop, I can not effect other method…

You could use a [player]logic map and change its value inside HealingStop function, instead of something you’d do

if(MyMap[Player]?):
    break

image
It worked! thank you!!

You’re welcome, but your code won’t work in multiplayer, since you’re resetting the map everytime, you have to assign the value of map, not the whole map, something like

option{set HealingLogic[Player] = false}

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.