The Daily Click ::. Forums ::. Klik Coding Help ::. Adventure game help, talk/hand/look icon.
 

Post Reply  Post Oekaki 
 

Posted By Message

awesomeasapossum



Registered
  16/01/2006
Points
  181
29th December, 2006 at 08:03:01 -

Okay, I have TGF. I am making a point and click adventure game. I have an object that's the talk/hand/look icon, but I need the animations to change when you right click.

EXAMPLE:

Right click 1 change animation to look
right click 2 change animation to hand
right click three change animation to talk
right click 4 change animation to look
and then it loops.

I have tried MANY,MANY things and cannot get it right! (Which is annoying because I did it before and then lost the file....)

Please help!

 
www.kqix.com
The Final King's Quest

axel

Crazy?

Registered
  05/02/2005
Points
  4766

Game of the Week WinnerYou've Been Circy'd!
29th December, 2006 at 08:34:52 -

* Right mouse button clicked
- Cursor: Add 1 to value A

* Value A of cursor > 2
- Cursor: Set value A to 0

* Value A of cursor = 0
- Cursor: Set animation to "look"

* Value A of cursor = 1
- Cursor: Set animation to "hand"

* Value A of cursor = 2
- Cursor: Set animation to "talk"

 
n/a

awesomeasapossum



Registered
  16/01/2006
Points
  181
29th December, 2006 at 09:19:50 -

Thanks a bundle!

 
www.kqix.com
The Final King's Quest

Dogzer



Registered
  07/02/2011
Points
  1029
29th December, 2006 at 09:39:09 -

. . .

 
n/a

awesomeasapossum



Registered
  16/01/2006
Points
  181
29th December, 2006 at 09:45:20 -

Now, I've added a walk icon. How would I make the character move? I think that you do this: you set the movement to bouncing ball and then whenever somebody clicks and the walk icon is up it creates an object that the character bounces toward. Is that right?

 
www.kqix.com
The Final King's Quest

CodeCannon

of DringleTopia

Registered
  13/04/2006
Points
  208
29th December, 2006 at 11:55:20 -

Yeah, make the character face the target object you created, then start its bounce movement. When the character collides with it - stop the character's bounce movement and destroy the target object. Remember to destroy the old target object if the mouse is clicked before the character has reached it.

If TGF supports loops, you should try custom movement instead. It will be difficult to use built-in movements smoothly when you add obstacles. Using things like sin & cos to reposition the character and using loops to back-track out of obstacles will give you more control.

Image Edited by the Author.

 
_
CodeCannon
http://www.dringletopia.da.ru/

axel

Crazy?

Registered
  05/02/2005
Points
  4766

Game of the Week WinnerYou've Been Circy'd!
29th December, 2006 at 17:32:57 -

Uh, yeah. Do make a custom one. And yes, there's a fastloop extension for TGF.

 
n/a

awesomeasapossum



Registered
  16/01/2006
Points
  181
30th December, 2006 at 12:53:00 -

Okay now, for some reason even this simple event isn't working!
This is what I want it to do: When the user left clicks and animation "walk" is playing, it creates an object.

This is my code:
*User clicks with left button
+(eye) animation walk is playing
Create X at (0,0) from (eye)

 
www.kqix.com
The Final King's Quest

axel

Crazy?

Registered
  05/02/2005
Points
  4766

Game of the Week WinnerYou've Been Circy'd!
30th December, 2006 at 14:47:32 -

Should work. Are you sure the animation's looping and everything? Must be something wrong with your other code.

 
n/a

awesomeasapossum



Registered
  16/01/2006
Points
  181
30th December, 2006 at 17:12:57 -

It wasn't looping. Thanks!

 
www.kqix.com
The Final King's Quest

awesomeasapossum



Registered
  16/01/2006
Points
  181
30th December, 2006 at 17:46:02 -

Another question: For some reason it can't create it if the icon is farther away than the characther.

 
www.kqix.com
The Final King's Quest

awesomeasapossum



Registered
  16/01/2006
Points
  181
30th December, 2006 at 19:05:03 -

It's because the mouse cursor and the icon become farther apart when the screen scrolls to follow the character. How would I fix this?

 
www.kqix.com
The Final King's Quest
   

Post Reply



 



Advertisement

Worth A Click