Hotspot.Move

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

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

Hotspot.Move

Postby mercedes » Fri Aug 15, 2008 4:47 am

Hi there...:)


Is there a way to move a hotspot...only to the side..or back and forth..not dragging it..just have it move..which is why i thought of hotspot.move..but it only moves once and its not to the side like..kind of on an angle..it moves..Wondered if someone might have an idea..Many Thanks!~

Would be cool if you could almost loop that hotspot.move..and stop it when wanted it to stop..or use the same script more than once..repeat it ..I guess..


THanks

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

Postby Mystery » Fri Aug 15, 2008 10:54 am

Code: Select all
Hotspot(NUMBER).Move X*15,Y*15,WIDTH*15,HEIGHT*15


If you want to simulate a movement back and forth, you need to resize the hotspot (smaller when moving back, bigger when moving forward).

A rotation is more difficult to simulate - you could use the GIF sequence player.
User avatar
Mystery
Forum Admin and Games Page admin
 
Posts: 2990
Joined: Sat Feb 04, 2006 8:12 am
Location: Switzerland

Postby mercedes » Fri Aug 15, 2008 10:58 am

So to do that...you would simply type it again then?...Like u can put that in twice in a row..haven't tried it yet to do that..will try it now..:)
I assume that is what u mean..You would adjust hieght and width then..not x and y..right..?

Thanks..:)
I have the Gif player..but u can't use it with 3rd person sprite..:(
User avatar
mercedes
VIP
 
Posts: 2460
Joined: Sun Mar 09, 2008 10:43 pm
Location: Canada..~

Postby Mystery » Fri Aug 15, 2008 11:05 am

If you want it only to seem like moving forward/backward, I wouldn't change the position, only the size, yes.

I guess you can use repeat or loop, but I'd have to try out myself first. However, I'm leaving back to work in a few minutes.
User avatar
Mystery
Forum Admin and Games Page admin
 
Posts: 2990
Joined: Sat Feb 04, 2006 8:12 am
Location: Switzerland

Postby mercedes » Fri Aug 15, 2008 11:13 am

Ok..Then, Thanks for response..Loop and Repeat...I was scared to use it first..Wanted someone else to say it was ok..Wasn 't sure if able to put that in the properties..i had thought that only for procedures.....:P I had thought using loop wasn't always good..:( with vbs Havent tried Repeat yet..i don't think....If you do get a chance..whenever you can of course..no big deal..Please share with me..:P

Thanks Very Much..
Peace~
Have a good day at work..:D
User avatar
mercedes
VIP
 
Posts: 2460
Joined: Sun Mar 09, 2008 10:43 pm
Location: Canada..~

Postby Lyberodoggy » Fri Aug 15, 2008 7:19 pm

One way to have a hotspot move and see the movement, is store x and y coordinates in two variables, then create a timed event that triggers a procedure.
Then write the procedure like this:

Code: Select all
x=x+5
y=y+5
Hotspot(index).Move x*15,y*15
User avatar
Lyberodoggy
Administrator
 
Posts: 2526
Joined: Sat Feb 17, 2007 3:31 pm
Location: Athens

Postby mercedes » Fri Aug 15, 2008 10:30 pm

Hi there..i may not be doing this right..this is what i have..

Code: Select all
Action.CreateTimedEvent 4.5 , "x =1 : Action.CreateTimedEvent 4.5, ""y=1"""

X and Y are variables..and this is in the Procedures):

Code: Select all
Sub hotspotmove

x=x+5
y=y+5
Hotspot(3).Move 370*15,305*15

End Sub



Is this right..?

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

Postby Mystery » Sat Aug 16, 2008 12:49 am

You should trigger in the hotspot what is in the procedure, otherwise the procedure makes no sense.
Code: Select all
Action.CreateTimedEvent 4.5 , "hotspotmove"


But I still have to try it out myself first for a looping effect - I just got home and it's almost 2 AM :P So I'll try it over the weekend unless Lyberodoggy posts before I do.
User avatar
Mystery
Forum Admin and Games Page admin
 
Posts: 2990
Joined: Sat Feb 04, 2006 8:12 am
Location: Switzerland

Postby mercedes » Sat Aug 16, 2008 4:40 am

Ive tried that before...it didn't do anything either...and niether is what i have...hm..ok well if you get a chance to test it...cool..:)

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

Postby Lyberodoggy » Sat Aug 16, 2008 8:06 pm

I didn't want to publish this code until the game was published but anyway...
Here's the project I 've created using this method. Feel free to look at its code.



I hope you have declared the x and y variables
Attachments
Shooting Field.zip
(258.36 KiB) Downloaded 382 times
User avatar
Lyberodoggy
Administrator
 
Posts: 2526
Joined: Sat Feb 17, 2007 3:31 pm
Location: Athens


Return to Adventure Maker Technical Support and Bug Reports

Who is online

Users browsing this forum: No registered users and 0 guests

cron