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
HAI GUYS!
SLAMnesia Offline
Member

Posts: 99
Threads: 39
Joined: May 2011
Reputation: 0
#11
RE: HAI GUYS!

Oh god, im trying to incorporate your script into mine and its difficult. I'll get back to you in 30 or so if I can't figure it out
OK I did my best in incorporating and I think it might be you at fault :\

I got an error:
main (111, 36): ERR :'_crankSignature' is not declared
main (113, 77): ERR :'_doorName' is not declared

these lines of code are (lines 105-117)
//If we have only one crank left, then that crank needs to be attached to the door.
   int crankCount = GetLocalVarInt("CrankCount");
   if(GetLocalVarInt("CranksDone") == crankCount-1)
    { //Find the crank that isn't attached yet so we can attach it.
      for(int i=1; i<=crankCount; i++)
       {
        if(GetLocalVarInt("state_"+_crankSignature+i) != 1)
         { //Found it? Attach it! Don't need to loop further now.
             InteractConnectPropWithMoveObject("MoveDoor",_crankSignature+i,_doorName,true,false,1);
          i=crankCount;
         }
       }
    }
(This post was last modified: 06-08-2011, 01:11 AM by SLAMnesia.)
06-08-2011, 12:48 AM
Find
Apjjm Offline
Is easy to say

Posts: 496
Threads: 18
Joined: Apr 2011
Reputation: 52
#12
RE: HAI GUYS!

Did you include the definition of the constants as I did in my code? Those constants are there so you can specify the names of the objects without having to alter the attachCrankToBase function at all.

/////////////////////////////////////////////////////////////
//CONSTANTS                                                //
/////////////////////////////////////////////////////////////
const string _crankSignature = "crank_base_"; //Constant so you can change the naming of your cranks.
const string _doorName = "vertical_door_1";   //Place the name of your door here

This was done to provide a single point of control for the attachCrankToBase function - want to use objects called "wheel_base_" - then instead of going through the code and changing it in loads of places, you can just do it in that one constant and let the HPL do the rest for you at no performance loss.

(This post was last modified: 06-08-2011, 02:41 AM by Apjjm.)
06-08-2011, 02:37 AM
Find
SLAMnesia Offline
Member

Posts: 99
Threads: 39
Joined: May 2011
Reputation: 0
#13
RE: HAI GUYS!

ooh sweet i didnt know that! umm im about to try it out but does the location of the constant code matter? if so where Big Grin
WOOO thanks man! The game opens and everything works flawlessly except >.>

the vertical door doesnt react or anything when I turn both cranks all the way. I've tried interchanging the cranks on but no avail Smile

FINISH THE BEAST YOU HATH CREATED!
<3 you so much no idea dude
DUDE I FIGURED IT OUT ON MY OWN!!!
http://plus4chan.org/b/coc/src/129479057199.jpg
I was poking around the map you made for me (thanks!) and I found that the crank_base# had "crankStateChanged" somewhere under the entity tab, so I made my map identicle to yours and wallah! Big Grin Big Grin you are a very generous lad and I bid you sleep well for the next 5 days
(This post was last modified: 06-08-2011, 03:54 AM by SLAMnesia.)
06-08-2011, 02:58 AM
Find




Users browsing this thread: 1 Guest(s)