Colored Boxes Script--Still NOT Working..[Solved]

This forum is meant for requesting technical support or reporting bugs.

Moderators: time-killer-games, Vengeance66, Candle, reneuend, GM-Support

Postby Mystery » Tue May 13, 2008 2:03 pm

No, not just the frame - the whole project folder of your game.

Copy-paste the project folder to the My Documents folder on your pc. Then if you have a tool to zip folders, you just need to right click the folder, and choose "Add to archive" or "Compress folder" or "Make ZIP" or something like this (depending on what tool you have). It's difficult to give an exact instruction because I don't know what kind of compression/decompression tool you have.


EDIT:

Sorry, I have to go now.
If you find a way to make your project folder available, I'll look at it when I get back.
User avatar
Mystery
Forum Admin and Games Page admin
 
Posts: 2990
Joined: Sat Feb 04, 2006 8:12 am
Location: Switzerland

Postby mercedes » Tue May 13, 2008 3:46 pm

GM.. was nice to rezip it..but they hotspots can't be disabled Lyberdoggy..i get an error when i go through the colours..as soon as i get back to black...

THanks anyways.

I'm not sure what im going to do now..so many frames i have to delete now...and start all over again..unbeleivable...argg..

*EDIT* They all give me error messages..except the one..wierd..oh well at least it works..now just to figure out how u did it..lol

Thanks Lyberdoggy..!~!!!..Hope i can do it now.. :lol:
Only cause i don't think there was anything wrong with the codes either of you gave me..i think its a graphics file th ing..AT least its what it looks like..I'm sure Mystery has used that code many times..so it doens't make sense that it would just not work now for me...but then again anything i do with this software..is like..surgery for some reason.. :lol:

Thanks again ..to the both of you..!~

Mystery if i try this and it does't work..i will send u project then..I hope it works.... :!:
User avatar
mercedes
VIP
 
Posts: 2460
Joined: Sun Mar 09, 2008 10:43 pm
Location: Canada..~

Not working still.

Postby mercedes » Wed May 14, 2008 3:52 am

Here is what is in each box..COLORCODE to exit scene is Red,Green,Blue,Black

Frame properties

Code: Select all
myvariable=1
box1=1
myvariable2=1
myvariable3=1
myvariable4=1


HOTSPOT #-1

Code: Select all
If myvariable>0 Then
Box1=0
End If
If myvariable=4 Then
myvariable=0
End If
Select Case myvariable
Case 0
color="BLACKBOX.jpg"
Case 1
color= "GREENBOX.jpg"
Case 2
color= "REDBOX.jpg"
Box1=1
Case 3
color= "BLUEBOX.jpg"
End Select
Action.LoadAPicture Hotspot(1),color
myvariable = myvariable+1


HOTSPOT#-2

Code: Select all
Box2=0
If myvariable2=4 Then
myvariable2=0
End If
Select Case myvariable2
Case 0
color="BLACKBOX.JPG"
Case 1
color="GREENBOX.JPG"
Box2=1
Case 2
color="REDBOX.JPG"
Case 3
color="BLUEBOX.JPG"
End Select
Action.LoadAPicture Hotspot(2), color
myvariable2=myvariable2+1


HOTSPOT#-3

Code: Select all
Box3=0
If myvariable3=4 Then
myvariable3=0
End If
Select Case myvariable3
Case 0
color="BLACKBOX.JPG"
Case 1
color="GREENBOX.JPG"
Case 2
color="REDBOX.JPG"
Case 3
color="BLUEBOX.JPG"
Box3=1
End Select
Action.LoadAPicture Hotspot(3), color
myvariable3=myvariable3+1



HOTSPOT#-4

Code: Select all
Box4=0
If myvariable4=4 Then
myvariable4=0
End If
Select Case myvariable4
Case 0
color="BLACKBOX.JPG"
Box4=1
Case 1
color="GREENBOX.JPG"
Case 2
color="REDBOX.JPG"
Case 3
color="BLUEBOX.JPG"
End Select
Action.LoadAPicture Hotspot(4), color
myvariable4=myvariable4+1



THE "EXIT" BUTTON..=Button to check if sequence is right.

Code: Select all
All boxes=Box1+Box2+Box3+Box4
If all boxes=4 Then
Action.GoToFrame "Solid01"
Else
Action.Message "Wrong Sequence"

End IF 
[color=red]This is where I get error message, expected "Then" error[/color]



Incedently the colour code to get out is..RED, GREEN, BLUE, BLACK.Colors are imported..

VARIABLES ADDED

THANKS for anyone who wants to look at this and help..!~
Attachments
VARIABLESPRINTSCREEN.JPG
VARIABLESPRINTSCREEN.JPG (74 KiB) Viewed 8914 times
pic of printed screen.JPG
pic of printed screen.JPG (93.01 KiB) Viewed 8914 times
User avatar
mercedes
VIP
 
Posts: 2460
Joined: Sun Mar 09, 2008 10:43 pm
Location: Canada..~

Postby GM-Support » Wed May 14, 2008 1:22 pm

When used in scripts, variables cannot contain spaces.

Therefore, "All boxes" should be only one word.
GM-Support
Forum Admin and Games Page admin
 
Posts: 2221
Joined: Thu Jun 05, 2003 7:52 pm

Postby mercedes » Wed May 14, 2008 7:11 pm

I have changed it and its still not working...I'll post screens again I guess..If you can't figure it out..I'll have to change all my frames to match his exit code. I have hints in the house to match RED,GREEN,BLUE,BLACK..

You know when u enlarge the screen..in the advanced tab..usually if there is something wrong..it won't let u hit "ok"..well all hotspots advanced screens close except...the EXIT hotspot..I get an expected "then" error..


"FIRST HOTSPOT" This one is set to RED being the variable..make sure i have it right I guess..BUT the colour in the hotspots are "BLACK" FOR ALL OF THEM.

Code: Select all
If myvariable>0 Then
box1=0
End If
If myvariable=4 Then
myvariable=0
End If
Select Case myvariable
Case 0
color="BLACKBOX.jpg"
Case 1
color= "GREENBOX.jpg"
Case 2
color= "REDBOX.jpg"
box1=1
Case 3
color= "BLUEBOX.jpg"
End Select
Action.LoadAPicture Hotspot(1),color
myvariable = myvariable+1


Second hotspot Variable here is Green.

Code: Select all
box2=0
If myvariable2=4 Then
myvariable2=0
End If
Select Case myvariable2
Case 0
color="BLACKBOX.JPG"
Case 1
color="GREENBOX.JPG"
box2=1
Case 2
color="REDBOX.JPG"
Case 3
color="BLUEBOX.JPG"
End Select
Action.LoadAPicture Hotspot(2), color
myvariable2=myvariable2+1


Third hotspot Variable here is Blue
Code: Select all
box3=0
If myvariable3=4 Then
myvariable3=0
End If
Select Case myvariable3
Case 0
color="BLACKBOX.JPG"
Case 1
color="GREENBOX.JPG"
Case 2
color="REDBOX.JPG"
Case 3
color="BLUEBOX.JPG"
box3=1
End Select
Action.LoadAPicture Hotspot(3), color
myvariable3=myvariable3+1


Fourth hotspotThe variable here is Black
Code: Select all
box4=0
If myvariable4=4 Then
myvariable4=0
End If
Select Case myvariable4
Case 0
color="BLACKBOX.JPG"
box4=1
Case 1
color="GREENBOX.JPG"
Case 2
color="REDBOX.JPG"
Case 3
color="BLUEBOX.JPG"
End Select
Action.LoadAPicture Hotspot(4), color
myvariable4=myvariable4+1


EXIT hotspot to leave the screen...where i'm getting "THEN" ERROR

Code: Select all
All boxes=box1+box2+box3+box4
If all boxes=4 Then
Action.GoToFrame "Solid01"
Else
Action.Message "Wrong Sequence"

End If



FRAME PROPERTIES..

Code: Select all
myvariable=1
box1=1
myvariable2=1
myvariable3=1
myvariable4=1



If this is too hard to read..then please let me know..as I won't post them anymore..I know must be harder to read someone else's work I assume of course.. :)

Many Thanks
Attachments
variablesprintscreen2.JPG
variablesprintscreen2.JPG (71.55 KiB) Viewed 8896 times
User avatar
mercedes
VIP
 
Posts: 2460
Joined: Sun Mar 09, 2008 10:43 pm
Location: Canada..~

Postby Mystery » Wed May 14, 2008 7:16 pm

mercedes wrote:
EXIT hotspot to leave the screen...where i'm getting "THEN" ERROR

Code: Select all
All boxes=box1+box2+box3+box4
If all boxes=4 Then
Action.GoToFrame "Solid01"
Else
Action.Message "Wrong Sequence"

End If


I haven't checked your whole code, but "all boxes" is still written separately...
User avatar
Mystery
Forum Admin and Games Page admin
 
Posts: 2990
Joined: Sat Feb 04, 2006 8:12 am
Location: Switzerland

Postby mercedes » Wed May 14, 2008 7:21 pm

You are a freaken genious woman.!..I thought that was treated as a sentence..not as part of variable..before the equal sign i guess is way i was thinking... :lol:


THANK YOU THANK YOU THANK YOU..!~


THANK YOU TO everyone else as well..@!~
User avatar
mercedes
VIP
 
Posts: 2460
Joined: Sun Mar 09, 2008 10:43 pm
Location: Canada..~

Postby Mystery » Wed May 14, 2008 7:25 pm

Oh, and I don't see "allboxes" on the variable list, did you add it?
User avatar
Mystery
Forum Admin and Games Page admin
 
Posts: 2990
Joined: Sat Feb 04, 2006 8:12 am
Location: Switzerland

Postby mercedes » Wed May 14, 2008 7:29 pm

No its not on there..but its working now..?..strange..which is why i thought nothing of it being separate..didn't look like part of code..I assume this like any other code..its what's after the = sign right..? Probably wrong there.. :?


Maybe cause ALLboxes= box1box2box3box4..?
any ideas..?


Ive tested it three times now and it's working...hmm..goes tonext frame and gives "wrong sequence" if not right...i only tested frame..not in runtime..mind you..
User avatar
mercedes
VIP
 
Posts: 2460
Joined: Sun Mar 09, 2008 10:43 pm
Location: Canada..~

Postby Mystery » Wed May 14, 2008 7:37 pm

Have you also tested the correct solution?

EDIT
Yes, you're right, you are declaring the variable ALLboxes by the equation :)
Last edited by Mystery on Wed May 14, 2008 7:48 pm, edited 1 time in total.
User avatar
Mystery
Forum Admin and Games Page admin
 
Posts: 2990
Joined: Sat Feb 04, 2006 8:12 am
Location: Switzerland

Postby mercedes » Wed May 14, 2008 7:43 pm

By correct sollution..I'm assuming you mean..

Red, Green,Blue,Black..and yes it works...takes me to the next screen..."exit" Congrat's screen..

Code: Select all
myvariable=1
box1=1 ------------------why is this here..?..I wondered about this.
myvariable2=1
myvariable3=1
myvariable4=1



That's in the frame properties..I copied pretty much what he did..only i changed variables around..so they matched mine..and also changed colours..other than that..pretty copied..think that's it..
[/code]
User avatar
mercedes
VIP
 
Posts: 2460
Joined: Sun Mar 09, 2008 10:43 pm
Location: Canada..~

Postby mercedes » Thu May 15, 2008 5:18 am

Hi there...can someone explain why i have to go through the sequence twice..for the variables to kick in...?

In the picture hotspots..i have black picture in them..would that make a difference..?

Sequence is RED,GREEN,BLUE,BLACK




Any ideas..?

Wondering if it has anything to do with Black pics in the hotspots..

*EDIT*

Because RED is my first colour in sequence..it has to be the primary colour in hotspot..that makes sense..lol..duh.
User avatar
mercedes
VIP
 
Posts: 2460
Joined: Sun Mar 09, 2008 10:43 pm
Location: Canada..~

Postby Lyberodoggy » Thu May 15, 2008 8:32 am

The allboxes variable is a local integer, therefore it hasn't got to be declared. Instead of it you could use box1+box2+box3+box4


In the frame's properties box1 is set to value 1 because it's already red, as it should be for the sequence to work. Without this code the player would have to cycle through colors once to get the hotspot work, or the programmer would have to add a Select Case, where if myvariable is equal to 1, box1 would set to 1 too.
User avatar
Lyberodoggy
Administrator
 
Posts: 2526
Joined: Sat Feb 17, 2007 3:31 pm
Location: Athens

Postby mercedes » Thu May 15, 2008 8:58 am

That's why i was cycling through it twice..didn't notice it at first...cause you can't help but go through them twice..the way i had it set up..with black in the hotspot..But then i tried it and it didn't work till i cycled through it a second time...So i changed it and it worked..AND tha'ts what the box1=1 is for in the frame properties..ah...I thought it has something to do with it..afterwards.Once i discovered the cycle motion..

I really really appreciate the help with this one..For some reason It didn't look near as much work ..But I see now that it definetly was..Thank you..!~..Now i can revert to it..when i need it..yay..


Anyhow Thanks..Lyberdoggy..Mystery...GM..:)
User avatar
mercedes
VIP
 
Posts: 2460
Joined: Sun Mar 09, 2008 10:43 pm
Location: Canada..~

Previous

Return to Adventure Maker Technical Support and Bug Reports

Who is online

Users browsing this forum: No registered users and 0 guests

cron