How to Use Action.SimulateHotspotClick?

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

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

How to Use Action.SimulateHotspotClick?

Postby 3dgamer » Mon Mar 09, 2009 12:34 am

Hi there,

I just wanted to know how to use the Action.SimulateHotspotClick feature. I am on my last code adjustment and I am trying to use it to get around changing a graphic/animation.
I can't really find any documentation on how to use this feature and what it is looking for to launch it. I have been trying it in Frame properties as well as in the Hotspot properties and it still isn't working.

Here is the line of code I am using:

Code: Select all
' Action.SimulateHotspotClick [Hotspot Indentifier]
' My hotspot number is "1"

Action.SimulateHotspotClick [1]

or
Code: Select all
Action.SimulateHotspotClick (1)


Any help with this would be much appreciated! :)
3DGamer
User avatar
3dgamer
Expert Member
 
Posts: 301
Joined: Mon Dec 15, 2008 7:12 am

Postby mercedes » Mon Mar 09, 2009 1:08 am

It does strange things to AM when u use this code..or at least it does on my end..strange things happen on my frame when i use this..but it might be the way im using it..i don't know..It may have to be used in conjunction with something else..

By the way I use..

Action.simulatehotspotclick 1 --no brackets.


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

Postby 3dgamer » Mon Mar 09, 2009 1:47 am

Hi Mercedes,

Thanks for the response and the tip. Hey, I wouldn't mind if it did something strange on my end...at least it would be a hint that it was working. I can't get it to do anything. But I will use the tip that you shared and see if that works. I'll let you know what happens.

Again, thanks! :)


-----------------[EDIT]---------------------

<sigh>

Well unfortunately I still can't get it to work, even without the brackets. :( I tried every permutation I could think of, but still it won't budge.

I guess all that is left is to redo the animation to accommodate for it, but I really had hoped this would work some how.

If anyone else has any ideas, please let me know because maybe I can still use it if I don't reach a certain point in re-doing the clip (or I can at least use it in another scene sometime later in another game)

Thanks again for the help, Mercedes.

-----------------[EDIT]---------------------

Okay, I re-did the animation. I think it looks okay but I really wished I could have done it with a non-user intervention (i.e. no clicking). Oh well. Any help with this is still appreciated since I really would like to be able to use this function in my next demo/game.

Well, thanks and take care.
3DGamer
User avatar
3dgamer
Expert Member
 
Posts: 301
Joined: Mon Dec 15, 2008 7:12 am

Postby Mystery » Tue Mar 10, 2009 2:49 am

You need to use it this way:

Code: Select all
Action.SimulateHotspotClick INDEX


So if it's about Hotspot #1, you need to enter
Code: Select all
 Action.SimulateHotspotClick 1


This way it should work :)

EDIT
Ah, I've just noticed that Mercedes has already posted this :lol:
Probably you have put the code in the wrong area. And without knowing details, it's not really possible to help you with that :?
User avatar
Mystery
Forum Admin and Games Page admin
 
Posts: 2990
Joined: Sat Feb 04, 2006 8:12 am
Location: Switzerland

Postby mercedes » Tue Mar 10, 2009 3:49 am

Describe what it is u want to do..i know u have it figured out..but I don't know..it presents a challenge to me now...lol..[My game is on hold for a bit] and I've seen this show of Medium...sooo...bored..:lol: Unless u are content with it of course, then thats good too..:D

Also, are u using a plugin for ur animation..? or just one u created..

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

Postby Lucifell » Tue Mar 10, 2009 4:10 pm

If you don't want the user to trigger your animation, why not use the Action.CreateTimedEvent function ? It works like this :

Action.CreateTimedEvent TIME , "CODE" , BOOLEAN

Where TIME is the delay in seconds, CODE the script you wish to be read after your delay, and BOOLEAN is either True if you want the event to be repeated, or False if you wish it to end.

You cans also use the brilliant KeyGuard plugin to trigger events when hovering your mouse over specified areas.

Hope this helped.
Lucifell
Member
 
Posts: 33
Joined: Mon Mar 02, 2009 2:09 pm

Postby juhuwoorps » Tue Mar 10, 2009 4:45 pm

You can also use the AnimationMaker plugin which allows you to start a animation in the frame properties or with scripting
juhuwoorps
Code Master
 
Posts: 622
Joined: Tue Jul 08, 2008 3:13 pm

Postby 3dgamer » Tue Mar 10, 2009 5:29 pm

Thank you Mystery, Mercedes, Lucifell, and juhuwoorps for your responses.

As suggested, I will describe a bit more so you can understand more clearly what I am trying to do.

What I am trying to do is come out of one frame and go into another that will play animation immediately upon arriving to it (since the first frame of the animation matches the clip, then it looks seamless). Then, directly after the clip stops (the video dissolves to black at the end), it automatically goes back to the same frame which now has a black hotspot to match it. From this point I want to continue, without player intervention, to the next frame by way of a dissolve. I am fine all the way up until this point. The hotspot comes up at the end in black, but I can't simulate a click so it can proceed to the next frame, automatically. So I am stuck with the player having to intervene and click. To work around this, I put something interesting in the middle of the black frame to hopefully prompt the player's interest to hover their mouse over it. When they see the pointer, they will click. But this is not what I wanted initially.

Here is some code that works so far, if that will help. It works up until prompting the black hotspot to appear.

Code: Select all
Action.CreateTimedEvent 11, "VAR1 = 1", FALSE 
PlayVideo GetPath(2) + "video.avi", 0, 0, 640, 480, False

'video is approx. 11 seconds
'VAR1 triggers black hotspot to appear at end of video


I have tried using the CreateTimedEvent to trigger the simulated click at the precise time, but I just can't get it to work, no matter how many different variations I try.

The only thing that does seem to work with this function is that in a test project, when I create another hotspot (hotspot B) and use the SimulateHotspotClick code in it with hotspot A's hotspot number, by clicking hotspot B, I am able to trigger the actions in hotspot A (which was not clicked). But this still is using player intervention...something I am trying to avoid. :(

I hope that helps explain my dilemma better. Thanks for all your help with this--any additional help would be truly appreciated.

Cya

@Mercedes - So why is your game on hold? :shock: And nope, I am not using a plugin for the animation...just one I created. :)
3DGamer
User avatar
3dgamer
Expert Member
 
Posts: 301
Joined: Mon Dec 15, 2008 7:12 am

Postby mercedes » Tue Mar 10, 2009 5:36 pm

Oh ok..then I would recommend using the Animation Maker..Juhuwoorps created..U can trigger an animation from the Frame's properties..In other words [No user clickage]--like that word.....lol..

http://www.adventuremaker.com/phpBB2/viewtopic.php?t=4518

That should work for u..I think u will like it better. The only thing is, you have to separate your animated layers -- so if its a cat lets say, then u would name the layers Cat1 Cat2 Cat3 and so on..up to the amount of layers..It accepts different extentions..so they can be .gif or .bmp..etc.

Then u upload them in your External folder/or Hotspot Folder or copy them into there...Then use the Frame's properties to call the animation..:)

If u need help with it..just post back..Or post in the thread if u aren't sure which to download from the thread..But i'm positive u will prefer it, its really versatile..and u can have more than one animation perframe..Also can trigger it from a hotspot as well..!~

Oh my game is on hold..I get vertigo sometimes..can't stay long on the PC...:P..It'll pass..then i'll tear it up again..:twisted:

If u need help to install the plugin..just holla..:D

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

Postby 3dgamer » Tue Mar 10, 2009 6:20 pm

mercedes wrote:Oh ok..then I would recommend using the Animation Maker..Juhuwoorps created..U can trigger an animation from the Frame's properties..In other words [No user clickage]--like that word.....lol..

http://www.adventuremaker.com/phpBB2/viewtopic.php?t=4518


First of all, my apologies to juhuwoorps. I had a brain freeze on the word "AnimationMaker"...saw the letters "A" and "M", thought in my mind "Adventure Maker", and it blew right past me!!! :oops: Thanks Mercedes for smacking me in the head and waking me up! :lol:

This sounds like a great plugin from what you are describing. I'll venture on over to the link in just a bit to check it out. Thanks again, Mercedes and sorry 'bout that juhuwoorps...I wasn't trying to ignore you....really I wasn't. :)

mercedes wrote:Oh my game is on hold..I get vertigo sometimes..can't stay long on the PC...:P..It'll pass..then i'll tear it up again..:twisted:


Sorry to hear 'bout that...I know how nasty vertigo can be. Feel better soon! :)

mercedes wrote:If u need help to install the plugin..just holla..:D


Thanks...will let you know! :)
3DGamer
User avatar
3dgamer
Expert Member
 
Posts: 301
Joined: Mon Dec 15, 2008 7:12 am


Return to Adventure Maker Technical Support and Bug Reports

Who is online

Users browsing this forum: No registered users and 0 guests