Page 1 of 3

Curious Problem

Posted: October 6th, 2010, 9:38 pm
by johnno56
I have already been using SB 2.5 for some time, then I decided to install the new SB 2.6

I was creating a map using 2.6 and created a locked door that requires a key to open.

Using the example in a Cubescript document, I created the door, the key and the script. Approached the door. "You need the key.". Grabbed the key. Approached the door, and nothing. The door remained locked.

I figured a simple script error. Could not find an error. Must have been the model settings? No. They were fine as well.

Tried the same map and script using SB 2.5 (both unedited) and worked like a charm. Place map and script back into SB 2.6 and the door remained shut.

Created newmap (/newmap 10) and called it tst01. placed a door (/newent mapmodel 110 11 4) and the key (/newent mapmodel 58 12 5) and the playerstart. Used the following script:

key1 = 1

level_trigger_4 = [
if ( = $key1 1 ) [ trigger 4 1 ] [ echo "You need a key." ]
]

level_trigger_5 = [
key1 = 1
]

Saved the script as tst01.cfg (note: used the inbuilt text editor to create cfg file)

I used the same script in both versions of SB with only version 2.5 working correctly.

Any thoughts?

J

Re: Curious Problem

Posted: October 6th, 2010, 10:34 pm
by daltonds1
Sorry to say But that code has no effect in 2.6 :( Coding is different from 2.5 and 2.6

Re: Curious Problem

Posted: October 6th, 2010, 11:37 pm
by johnno56
Daltonds1,

Thank you for replying so quickly.

Maybe I should have read "the changes" before installing 2.6?

Again, thanks for the info.

Regards

J

PS: I have searched the forum and net for script tuts, but nothing for 2.6

Re: Curious Problem

Posted: October 7th, 2010, 10:51 am
by klimyriad
daltonds1 wrote:Sorry to say But that code has no effect in 2.6 :( Coding is different from 2.5 and 2.6

Ermm funny all my coding seems to work but then it is simple coding.

Re: Curious Problem

Posted: October 7th, 2010, 2:51 pm
by daltonds1
klimyraid

The coding system is complety different..
Ask hirato

And no prob

Re: Curious Problem

Posted: October 7th, 2010, 3:18 pm
by johnno56
Klimyriad,

You said that, "Ermm funny all my coding seems to work...". Curious. Then I have only one logical recourse.

If the coding is correct; and the models are setup correctly; and the maps are identical, then the only area to check, is the in-built editor.

I will create the same script for versions 2.5 and 2.6, using an external pure text editor, and report back within the hour.

Ah. Isn't problem solving fun? :)

Regards

J

Re: Curious Problem

Posted: October 7th, 2010, 3:42 pm
by johnno56
Hey guys,

I am at a loss.

I have recreated the script using an external editor and copied the code into both version 2.5 and 2.6. The 2.5 version ran correctly but the 2.6 version did not.

I will try to attach my test map and files. If somebody can do me the favour of trying my files in both versions, and let me know the results, I would be most appreciative.

Regards

J

ps: I need to know one of three possible outcomes. 1) It's me. 2) It's the program or 3) It's the PC

Re: Curious Problem

Posted: October 7th, 2010, 3:46 pm
by johnno56
pss: One odd thing I did notice.... When I copied the .cfg and loaded the map (ver 2.6), I figured I would take a look at the code via the internal editor (F6 - in edit mode) and found that the closing "]" was missing. Checked the text code, fine. Replaced missing "]" but still no change. Just thought I would point it out.

Re: Curious Problem

Posted: October 7th, 2010, 4:25 pm
by klimyriad
Well i know stuff like newgui and showgui works all level_trigger_1 and stuff all works and a few other things but that's simple coding though but does sandbox needs to change coding so much or keep the same coding but improve to be honest i have no idea and i need to learn it more then i can help.

Re: Curious Problem

Posted: October 7th, 2010, 5:29 pm
by johnno56
Klimriad,

Thank you for you help. Much appreciated.

Another point: I also have Sauerbraten ("big brother" of Sandbox?) installed. Although the map model numbers are different, I used the same code, and it worked perfectly.

J