(05-01-2014, 09:30 PM)Mudbill Wrote: I think what you saw was a for-loop, not an if-statement. For-loops generally look something like
for(int i = 0; i <= 3; i++) {
OtherCode();
}
They basically repeat the code within for a set amount of times.
But you don't need these to make the script area trigger the event. Did you set an AddEntityCollideCallback in OnStart using the book on the area?
Nope. I just used "SetEntityConnectionStateChangeCallback()".
I gonna try that, but yesterday evening I was too confused to figure it out by myself.
As always, thanks for your help.
(05-01-2014, 10:09 PM)daortir Wrote: For one book just add an entitycollidecallback between the book and a small area near it, that calls a function which unlocks the door. No need for variables with only 1 book ! : >
Yeah, I saw that too. I also looked in your script, but it had "for-loops" in it. That confused me quite a bit.
Thanks for helping!