Code: Select all
auto state LookForHeatMap {
event BeginState() {
Log(0);
GotoState('LookForHeatMap', 'LookFor');
Log(1);
}
LookFor:
Log(2);
}
Code: Select all
auto state LookForHeatMap {
event BeginState() {
Log(0);
GotoState('LookForHeatMap', 'LookFor');
Log(1);
}
LookFor:
Log(2);
}
Mhm, I doubt it's like that tho. GotoState() is not even an event, so it cannot be programmatically ignored, unless you're talking about native ignoring, but I don't see why they should have put it.Feralidragon wrote:Not sure, but I would say that GotoState calls are ignored during BeginState and EndState, since these are called during GotoState already.
Code: Select all
auto state LookForHeatMap {
Begin:
Log(0);
LookFor:
Log(1);
}
Thanks, that was the workaround I used, anyway I wanted an infinite recursion(almost), I needed a loop, but using 'while' looked too much CPU consuming, I guess it's the same with a state loop.Higor wrote:That is 0/10 tier state coding.
BeginState is executed right as you call GotoState, the engine protects itself from an infinite recursion here, figure it out it's not too difficult.
Second, if you want to start executing script on the state frame, add a 'Begin:' label and it'll start executing during next tick update.
What I'm doing is:Barbie wrote:An infinite recursion is another thing than an infinite loop...
It looks like you want to code a kind of polling - what do you want to achieve? Maybe there is a better solution than polling.
? Taking over your laptops of course...papercoffee wrote:I somehow don't like the sound of this.
What exactly is your goal?
It all works anyway, it's just that Idk if to revert the changes and use TCP back, to avoid the CPU consuming loop.PrinceOfFunky wrote:Code: Select all
state LookForHeatMap
I don't have a laptop ...I'm interneting with a potato.PrinceOfFunky wrote:? Taking over your laptops of course...papercoffee wrote:I somehow don't like the sound of this.
What exactly is your goal?
Jk, it's for the HeatMap:It all works anyway, it's just that Idk if to revert the changes and use TCP back, to avoid the CPU consuming loop.PrinceOfFunky wrote:Code: Select all
state LookForHeatMap
If you're using GLaDOS, that's surely better than a laptop.papercoffee wrote:I'm interneting with a potato.
No, I need to write it server-side, the heatmaps must be written.papercoffee wrote:I'm just curious why you need to write a file on the clients machine from outside?
The detailed flow was like:PrinceOfFunky wrote:What I'm doing is:
- Call an external script that has to write a file.
- Loop to check if the file has been created.
Otherwise the sleep() command could has been useful; something like this (untested):PrinceOfFunky wrote:So TCP is the way
Code: Select all
auto state WaitForIt {
begin:
if (WaitMore())
{
sleep(1);
goto('begin');
}
// processing code here
}
Thanks, I'll try it right now.Barbie wrote:Otherwise the sleep() command could has been useful; something like this (untested):PrinceOfFunky wrote:So TCP is the wayCode: Select all
auto state WaitForIt { begin: if (WaitMore()) { sleep(1); goto('begin'); } // processing code here }