Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Help Movable Book [Solved]
ethics Offline
Member

Posts: 51
Threads: 18
Joined: Jan 2014
Reputation: 0
#4
RE: Movable Book

(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

PHP Code: (Select All)
for(int i 0<= 3i++) {
    
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!

(This post was last modified: 05-02-2014, 09:38 AM by ethics.)
05-02-2014, 09:36 AM
Find


Messages In This Thread
Movable Book [Solved] - by ethics - 05-01-2014, 09:14 PM
RE: Movable Book - by Mudbill - 05-01-2014, 09:30 PM
RE: Movable Book - by ethics - 05-02-2014, 09:36 AM
RE: Movable Book - by daortir - 05-01-2014, 10:09 PM
RE: Movable Book - by DnALANGE - 05-02-2014, 02:30 PM
RE: Movable Book - by ethics - 05-10-2014, 10:27 AM



Users browsing this thread: 1 Guest(s)