Othello

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

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

Othello

Postby mercedes » Tue May 31, 2011 1:23 am

I'm struggling with the Othello script..

I want to make it so they get an item..But only if Black wins..

So i made a variable 'blackwins'
I assume it goes somewhere in this part;

Code: Select all
If WhiteScore = 0 or (OneEmptyCellFound = 0 and WhiteScore < BlackScore) then MsgBox  "Black Wins!" + vbcrlf + vbcrlf + "Congratulations!", vbInformation, "Othello"


I just want to squeeze that variable into the script..So i can call it somewhere else..If blackwins=1..actions

I've tried so many alternatives..That at one point..It seemed like it was working..3-4*'s in a row...Then it doesn't work..

Really starting to hate Othello..I can make black win on a dime though..
User avatar
mercedes
VIP
 
Posts: 2460
Joined: Sun Mar 09, 2008 10:43 pm
Location: Canada..~

Postby reneuend » Tue May 31, 2011 1:42 am

are you wondering where to define the variable so its accessible in other parts of the game? You could put it in the game's project properties - advanced area and make it a global variable.
---


Image
Image
User avatar
reneuend
Administrator
 
Posts: 2762
Joined: Sat Nov 22, 2008 8:37 pm
Location: Midwest Cornfield, USA

Postby mercedes » Tue May 31, 2011 2:04 am

..I want to make a variable so that it works with the Othello script..and yes..be able to access it anywhere in the project..


What was bugging me..was I was hoping to add an item..only after they clicked on the HS in another frame--and Black already won..

So once they won..they would go back to the frame previous..Click on a briefcase..and the item would add then..Cause black won.

..However..I may have to settle for it to be added right then...right there on the same Othello frame

What I did was this;

Code: Select all
If WhiteScore = 0 or (OneEmptyCellFound = 0 and WhiteScore < BlackScore) then
MsgBox  "Black Wins!" + vbcrlf + vbcrlf + "Congratulations!", vbInformation, "Othello"
Blackwins = 1
Action.AddItem "PuzzlePc_2"
End If


Didn't really want to do that..but..I may have to settle for it..

********

I had done something before and it worked..3-4*'s in a row...
But then Black won too soon....There was still a bunch of empty spots on the board..It didn't look right.

But then it occurred to me after..There were only black tiles on the board...Of course it won soon..tsk..

I'm so dumb..I wish i would remember what I did..lol
I cycle through things quickly..and don't really focus..
User avatar
mercedes
VIP
 
Posts: 2460
Joined: Sun Mar 09, 2008 10:43 pm
Location: Canada..~

Postby reneuend » Tue May 31, 2011 2:18 am

WAIT!!!!!!!! Its easy!

Create a variable that can be 1 or 0.

If black wins set it to 1. when the player goes to the briefcase if the variable is 1 then they can get the prize, else NOT
---


Image
Image
User avatar
reneuend
Administrator
 
Posts: 2762
Joined: Sat Nov 22, 2008 8:37 pm
Location: Midwest Cornfield, USA

Postby mercedes » Tue May 31, 2011 9:44 am

I think I managed it!..yayy....

I used this; Blackwins is a variant variable..

Code: Select all
Sub UpdateScores
'code...
If WhiteScore = 0 or (OneEmptyCellFound = 0 and WhiteScore < BlackScore) then
Blackwins = 1
MsgBox "Black Wins!"
End If
End Sub


And I have this in the briefcase hotspot on another frame; I didn't use an Else....It's not adding the item otherwise..It doesn't do anything until blackwins = 1..

Code: Select all
If blackwins=1 Then
Action.AddItem "PuzzlePc_2"
End If
RemoveDuplicateInstances "PuzzlePc_2"




I'm proud of myself..I have 13 frames..and so far only 11 variables..
Usually by now..I would have about 30 variables..and they would look something like this for each item....

Key
Key_used
Key_Taken
Key_gone
Key_Had
Key_placed
Key_lost---lol
User avatar
mercedes
VIP
 
Posts: 2460
Joined: Sun Mar 09, 2008 10:43 pm
Location: Canada..~

Postby reneuend » Tue May 31, 2011 10:17 am

:lol:

At least you're descriptive!
---


Image
Image
User avatar
reneuend
Administrator
 
Posts: 2762
Joined: Sat Nov 22, 2008 8:37 pm
Location: Midwest Cornfield, USA

CInt error

Postby mercedes » Tue Jun 21, 2011 7:36 am

Hey there..

This worked for the longest time..Then I went to try it today.. I'm getting an error..>?

CInt type mismatch ..I can't even click a cell..in the game..

Would it have anything to do with KG? Othello script works with HotspotTAGs...

I don't know what to do with this..I was just hoping I could call the current frame..But not sure where to put it..

It worked perfectly..Then i went to test it today..and this

Should I scrap it..?

many thanks..
User avatar
mercedes
VIP
 
Posts: 2460
Joined: Sun Mar 09, 2008 10:43 pm
Location: Canada..~

Postby reneuend » Tue Jun 21, 2011 2:46 pm

Scrap it because of a little "type mismatch" error??? :shock: :shock:
I would see what type the system was looking for first. It doesn't sound like KG, but would have to see the code.
---


Image
Image
User avatar
reneuend
Administrator
 
Posts: 2762
Joined: Sat Nov 22, 2008 8:37 pm
Location: Midwest Cornfield, USA

Postby mercedes » Wed Jun 22, 2011 4:35 am

I found it!~

yayy...It's because amongst all my subs...[which there are quiet a few..]

Othello uses a sub called ResetGame...and i noticed there is another one of the subs in there..My button puzzle It's..called ResetGame()

As soon as i changed the other to...Reset_Game...s'all good..:D

Not sure if I should change the Othello one..it might be easier..then that one..cause..It' only in the one place..Where as my button one..I'ts in a few places..God forbid i miss one..lol..
User avatar
mercedes
VIP
 
Posts: 2460
Joined: Sun Mar 09, 2008 10:43 pm
Location: Canada..~


Return to Adventure Maker Technical Support and Bug Reports

Who is online

Users browsing this forum: No registered users and 0 guests

cron