Another syntax problem

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

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

Another syntax problem

Postby juhuwoorps » Tue Aug 19, 2008 7:25 am

I tried this:

Code: Select all
IF stickbewegt=1
THEN  Hotspot(7).move =180*15
End If

And I get the error THEN EXPECTED.

I think it's just a syntax error but I don't know how to get it right :(

Thanks for help!
juhuwoorps
Code Master
 
Posts: 622
Joined: Tue Jul 08, 2008 3:13 pm

Postby mercedes » Tue Aug 19, 2008 9:25 am

Hi there...:)

Try this..

Code: Select all
If stickbewegt=1 Then
Hotspot(7).Move 180*15,170*15,100*15,100*15 ---Just an example

End if


Just so you know for future reference..the "Then" has to be on the same line as the If statement...:)
Peace~
User avatar
mercedes
VIP
 
Posts: 2460
Joined: Sun Mar 09, 2008 10:43 pm
Location: Canada..~

Postby juhuwoorps » Tue Aug 19, 2008 2:42 pm

Ok.
I tried this and the error is gone, but the hotspot doesn't move.

I wrote it in the hotspot properties->no move
I wrote it in the frame properties->no move.

:(
The variable is changed to 1
juhuwoorps
Code Master
 
Posts: 622
Joined: Tue Jul 08, 2008 3:13 pm

Postby Lyberodoggy » Tue Aug 19, 2008 7:53 pm

you need both x and y coordinates to move it.

So you need
Code: Select all
IF stickbewegt=1 THEN 
Hotspot(7).move =180*15,150*15
End If
User avatar
Lyberodoggy
Administrator
 
Posts: 2526
Joined: Sat Feb 17, 2007 3:31 pm
Location: Athens

Postby mercedes » Wed Aug 20, 2008 1:15 am

Juhuwoorps, did you figure this out..I see you have another thread here..wondering if it's the same problem..and you have figured it out ..:)

Also are you trying to move an inventory item or backround item?

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

Postby juhuwoorps » Wed Aug 20, 2008 7:15 am

Ok. ?hm.
Perhaps it's better to show you what I want to do.

I want to click a hotspot in the first frame and set a variable(e.g test)=1

When I switch to the second frame and test=1, I want to move another hotspot
in the second frame(e.g spot2).

If I use the codes you posted, they'll only work without the "If .... then" code.

I know I can do this on other ways like enable/disable hotspots, but I want to know how to use it right and i have the offer to get a special effect;)

I hope you understand my problem.

Thanks for answers!

J.
juhuwoorps
Code Master
 
Posts: 622
Joined: Tue Jul 08, 2008 3:13 pm

Postby mercedes » Wed Aug 20, 2008 7:50 am

Hi there..

No that code won't work for what you want..Only because each HS has its own identity in its frame..so that code definetly won't do it..I beleive hotspot.move works to move a HS within the same frame.


If someone else might know of something ..but I have only ever used it within the same frame...

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

Postby juhuwoorps » Wed Aug 20, 2008 8:08 am

The code doesn't work also in the same frame :shock:

Nevermind. I work on another way to get what i want. :)

Many thanks for your answers and your efforts to help me.

Hope it would be the same next time :)
juhuwoorps
Code Master
 
Posts: 622
Joined: Tue Jul 08, 2008 3:13 pm

Postby mercedes » Wed Aug 20, 2008 8:20 am

If you want a hotspot to move within the same frame..then try it like this then..Have it load the picture and move then...

Put this in the advanced...of say hotspot(1)


Code: Select all
If myvariable = 1 Then
Action.LoadAPicture Hotspot(5),"Picture"---put the pic u want to move.
Hotspot(5).Move 52*15,26*15,790*15,595*15
End if



Make hotspot(5) only visible when hotspot 1 variable =1..work with variable tab as well If you want..:)


Peace

Hope that helps..:)
Last edited by mercedes on Thu Aug 21, 2008 11:32 am, edited 2 times in total.
User avatar
mercedes
VIP
 
Posts: 2460
Joined: Sun Mar 09, 2008 10:43 pm
Location: Canada..~

Postby Lyberodoggy » Thu Aug 21, 2008 11:10 am

Are you sure you have gone to VB Variables and added the integer variable test?
User avatar
Lyberodoggy
Administrator
 
Posts: 2526
Joined: Sat Feb 17, 2007 3:31 pm
Location: Athens

Postby juhuwoorps » Fri Aug 22, 2008 7:08 pm

I'm not shure. I'll try it later this day a second time with a new test project.
Perhaps I have had some other errors at the last time :)
juhuwoorps
Code Master
 
Posts: 622
Joined: Tue Jul 08, 2008 3:13 pm


Return to Adventure Maker Technical Support and Bug Reports

Who is online

Users browsing this forum: No registered users and 0 guests

cron