Thoughts about Resting

Discuss the IceBlink Engine

Re: Thoughts about Resting

Postby Dorateen » Tue May 28, 2013 10:39 pm

edit: Wait... I think I got it.

Doing some more testing
User avatar
Dorateen
Backer
Backer
 
Posts: 939
Joined: Mon Nov 26, 2012 2:08 pm

Re: Thoughts about Resting

Postby slowdive » Tue May 28, 2013 11:03 pm

It looks like his first line should have two // not one. Maybe that will fix it.

//gaRest.cs

not

/gaRest.cs
User avatar
slowdive
Site Admin
Site Admin
 
Posts: 3106
Joined: Wed Nov 21, 2012 11:58 pm

Re: Thoughts about Resting

Postby Dorateen » Tue May 28, 2013 11:07 pm

Heh, yes, that did it.

Sweet... and the dead live!

Although I did not get the message box. I'll take a closer look at that.
User avatar
Dorateen
Backer
Backer
 
Posts: 939
Joined: Mon Nov 26, 2012 2:08 pm

Re: Thoughts about Resting

Postby slowdive » Tue May 28, 2013 11:12 pm

remove the // in front of the messageBox and that will fix that. Using // comments out the line of code.
User avatar
slowdive
Site Admin
Site Admin
 
Posts: 3106
Joined: Wed Nov 21, 2012 11:58 pm

Re: Thoughts about Resting

Postby Dorateen » Wed May 29, 2013 2:53 am

This is great, I'm actually learning something about coding.

The script is working perfectly, and now I'm looking forward to adding more custom scripts.
User avatar
Dorateen
Backer
Backer
 
Posts: 939
Joined: Mon Nov 26, 2012 2:08 pm

Re: Thoughts about Resting

Postby slowdive » Wed May 29, 2013 2:59 am

So, the Rest button is visible if you set the module property "UseRestSystem" to "true". Each area defaults to not allowing resting by disabling the button (greyed out). to allow resting in an area, change the area's property "RestingAllowed" to "true". This will enable the rest button. For now, if you want to turn the button on/off depending on where you are in an area, you could use a trigger with a script that turns "sf.frm.btnRest.Enabled" to true or false.

The current restSystem.cs script is just a place holder and only gives a messageBox. Adding Karl's code for resting to the "restSystem.cs" script would be a great start.
User avatar
slowdive
Site Admin
Site Admin
 
Posts: 3106
Joined: Wed Nov 21, 2012 11:58 pm

Re: Thoughts about Resting

Postby youngneil1 » Wed May 29, 2013 4:29 am

Argh, sorry about the missing "/" at the beginning. Copied stuff to hastily :oops:.

This is great, I'm actually learning something about coding.


Yepp, same for me. And it gets better day by day which is a fine thing in itself (besides building the module and helping to refine IB).
User avatar
youngneil1
Backer
Backer
 
Posts: 4877
Joined: Sat Dec 08, 2012 7:51 am

Previous

Return to General Engine Discussion

Who is online

Users browsing this forum: No registered users and 1 guest

cron