Page 4 of 4
Re: ~Advanced Scripting and Editor Help
Posted: Fri Oct 24, 2014 8:40 pm
by dancodan
Wow thanks a lot guys!
It works now.
I finally understand why the object didnt spawn on the surface. Cause I didn't have the item in the world already.
I will now try to spawn it directly in to the Alcove, without having it in the world already.
Thanks JohnWOrdsworth, Nutjob and SnowyOwl47.
I really appreciate the help guys
Re: ~Advanced Scripting and Editor Help
Posted: Fri Oct 24, 2014 11:23 pm
by NutJob
Anyone know how to get the state of a lever (actived/deactivated, true/false, 0/1, Good Ash/Bad Ash)?
Works! But only because that lever is real and I'm not imagining it. (it exists in the game)
Code: Select all
lever_state = myStupidLeverPullMe.lever:isEnabled()
Works
Code: Select all
myStupidLeverPullMe.lever:setState("activated") --as well does "deactivated" of course
Therefore you'd think...
Code: Select all
unkLever_state = myStupidLeverPullMe.lever:getState()
..but it don't.
So I tried Log1 method call
Code: Select all
strLever_state = myStupidLeverPullMe.lever:getLeverState()
...nada
Now, just trying anything.
Code: Select all
unkLever_state = myStupidLeverPullMe.lever:isActive() -- seems sensible
unkLever_state = myStupidLeverPullMe.lever:isActived()
unkLever_state = myStupidLeverPullMe.lever:isDeactivated() -- sure I'll accept reverse logic, anything please
Note: I setup a floor_trigger to [attempt] to get the state of the lever so I didn't mess with logic as the lever is being pulled/interacted. So question is GOTO Line:1
Re: ~Advanced Scripting and Editor Help
Posted: Fri Oct 24, 2014 11:35 pm
by JohnWordsworth
Haha, you got very close - it was just a spelling mistake that threw you!
I have just tried the following, and it returns true or false...
Re: ~Advanced Scripting and Editor Help
Posted: Fri Oct 24, 2014 11:40 pm
by NutJob
JohnWordsworth wrote:Haha, you got very close - it was just a spelling mistake that threw you!
I have just tried the following, and it returns true or false...
WORKS!
{joyous exclamative} You are pure awesome for finding my error!
I think I need to step away from the code for the evening! I think I just hit 14 hours now and my head banging is not a result of Heavy Metal!
Re: ~Advanced Scripting and Editor Help
Posted: Fri Oct 24, 2014 11:42 pm
by JohnWordsworth
There is a point where you just gotta sleep :p. Although, I think there is a Twitch interview with a couple of the LOG guys in 45 minutes - so just hold out a bit longer...? :p
Re: ~Advanced Scripting and Editor Help
Posted: Fri Oct 24, 2014 11:43 pm
by NutJob
I'll pop to the front of these forums and find a link. Thanks, for the heads up. Setting up a universal bitmask parser for puzzle solving I think is too much right now.
Re: ~Advanced Scripting and Editor Help
Posted: Wed Oct 29, 2014 8:27 pm
by SpacialKatana
Is there any way of finding out what the gfxIndex numbers are for the keys? I see JW used 30 for his tome...I need to clone keys.
Cheers.
Re: ~Advanced Scripting and Editor Help
Posted: Wed Oct 29, 2014 9:21 pm
by ScroLL
SpacialKatana wrote:Is there any way of finding out what the gfxIndex numbers are for the keys? I see JW used 30 for his tome...I need to clone keys.
Cheers.
Another great solution from John Wordsworth:
Spawn the item whose gfxindex you want to see and print it to the console:
Code: Select all
print(spawn("tome_wisdom").item:getGfxIndex());
Re: ~Advanced Scripting and Editor Help
Posted: Wed Oct 29, 2014 9:52 pm
by SpacialKatana
ScroLL wrote:SpacialKatana wrote:Is there any way of finding out what the gfxIndex numbers are for the keys? I see JW used 30 for his tome...I need to clone keys.
Cheers.
Another great solution from John Wordsworth:
Spawn the item whose gfxindex you want to see and print it to the console:
Code: Select all
print(spawn("tome_wisdom").item:getGfxIndex());
Awesome dood fank you very much ( The key was 62 btw)
