Welcome to the Builder Academy

Question Saving object timer values to pfile with remote

More
24 Mar 2018 20:34 #7790 by hurin
Yeah its not ideal, but you see what coder I'm working with!

So until he actually makes some changes I am stuck with doing it this way. My problem (I think?) was in the evaluation of the variables. I think it was how I was doing it in the if statement? I moved the evaluation outside of the if and it pulled the value perfectly.

This of course works because as clarified above the uniqueid is truly unique to that object from the moment of creation.

eval tempid %self.Uniqueid%
eval temptimer %%actor.%temp%%% ***** this now pulls the timer value, before in the IF it wouldnot
if %actor.varexists(%tempid%)%
if %self.timer% > %temptimer%
%echo% I will be updating my timer from %self.timer% to %temptimer%
otimer %temptimer%
elseif %self.timer% < %temptimer%
%echo% updating player global from %temptimer% to %self.timer%
eval %self.Uniqueid% %self.timer%
remote %self.Uniqueid% %actor.id%
end
else
%echo% player had no oven timer variable stored - creating
eval %self.Uniqueid% %self.timer%
global %self.Uniqueid%
remote %self.Uniqueid% %actor.id%
end

So far its working pretty good.
Thanks for the time and help Thomas!

Please Log in or Create an account to join the conversation.

Time to create page: 0.164 seconds