The Daily Click ::. Forums ::. Klik Coding Help ::. Changing weapons???
 

Post Reply  Post Oekaki 
 

Posted By Message

-Nick-

Possibly Insane

Registered
  24/11/2002
Points
  2468

VIP Member
1st July, 2006 at 07:29:13 -

Or to put it simply, the lag can be removed by ensuring the "always - set handbag/gun to position" after the movement events take place.

Otherwise, you set the position, then move the character out the way. Lol. I've done that a couple of times by accident.

 
Project: Roller Coaster is on it's way!
http://www.projectrollercoaster.co.uk/
http://www.craftsncreatures.com

Del Duio

Born in a Bowling Alley

Registered
  29/07/2005
Points
  1078

GOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!Evil klikerHasslevania 2!The OutlawSanta Boot
1st July, 2006 at 07:34:21 -

Fox has a good idea with what he says. That way, you don't have to do a zillion events for EVERY possibility for your player character. (Events for a hamster with a purple handbag, then more for a blue handbag, then more for a green handbag..) The best thing about Fox's method is that you'd only have to test collisions on the actual player character itself and you'd save yourself a ton of work.

I suggest taking what he says a bit further too- Have the mask character have say 5 different sets of user-defined animations like Purple, Blue, Green, etc. Then you could store the value of your weapon (or handbag) globally and set the user animation you made to the corresponding weapon value.

Something like:

If WEAPON = 0 then change animation to "Blue"(character mask)
If WEAPON = 1 then change animation to "Purple"(character mask)
If WEAPON = 2 then change animation to "Green"(character mask)

You'd have to account for different states like movement and attacks, but that's the general idea at least.



 
--

"Del Duio has received 0 trophies. Click here to see them all."

"To be a true ninja you must first pick the most stealthy of our assorted combat suits. Might I suggest the bright neon orange?"

DXF Games, coming next: Hasslevania 2- This Space for Rent!

..:.Phox.:..



Registered
  18/02/2005
Points
  646

VIP MemberHero of TimeI like Aliens!Cardboard BoxAttention Getter
1st July, 2006 at 12:51:27 -

Yep, forgot to say that.

 
Profile edited as it messed the layout of the site up.

Ski

TDC is my stress ball

Registered
  13/03/2005
Points
  10130

GOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!KlikCast HelperVIP MemberWii OwnerStrawberryPicture Me This Round 28 Winner!PS3 OwnerI am an April Fool
Candy Cane
1st July, 2006 at 12:58:38 -

Hmmm so did I... I knew that..yeees ¬_¬

 
n/a

markno2



Registered
  06/06/2006
Points
  865

Game of the Week WinnerVIP MemberPicture Me This Round 30 Winner!Weekly Picture Me This Round 39 Winner!Kliktober Special Award Tag
2nd July, 2006 at 11:37:32 -

How do you get the animations in sync with Fox's method?

 
Discarded pizza boxes are an indispensable source of cheese.

Dustin Gunn

Gnarly Tubular Way Cool Awesome Groovy Mondo

Registered
  15/12/2004
Points
  2659

Game of the Week WinnerKlikCast StarVIP MemberI'm on a BoatGOTW Winner Oct 2010Kliktober Special Award Tag
2nd July, 2006 at 11:44:38 -

You're going to need to develop for the PS3 if you want real-time... weapon change. Sorry.

 
n/a

markno2



Registered
  06/06/2006
Points
  865

Game of the Week WinnerVIP MemberPicture Me This Round 30 Winner!Weekly Picture Me This Round 39 Winner!Kliktober Special Award Tag
3rd July, 2006 at 05:19:06 -

No there is a way. Look at Schizo Bob, it has several real-time weapon changes... All at once!

 
Discarded pizza boxes are an indispensable source of cheese.

Del Duio

Born in a Bowling Alley

Registered
  29/07/2005
Points
  1078

GOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!Evil klikerHasslevania 2!The OutlawSanta Boot
3rd July, 2006 at 07:38:48 -

You could always set the animation frame of the mask to the animation frame of the actual player. That's what I'd do.

 
--

"Del Duio has received 0 trophies. Click here to see them all."

"To be a true ninja you must first pick the most stealthy of our assorted combat suits. Might I suggest the bright neon orange?"

DXF Games, coming next: Hasslevania 2- This Space for Rent!

markno2



Registered
  06/06/2006
Points
  865

Game of the Week WinnerVIP MemberPicture Me This Round 30 Winner!Weekly Picture Me This Round 39 Winner!Kliktober Special Award Tag
3rd July, 2006 at 10:01:20 -

What code do I use?

 
Discarded pizza boxes are an indispensable source of cheese.

colej_uk



Registered
  15/05/2002
Points
  1627
3rd July, 2006 at 10:07:33 -

In Bob The Schizo, Bob is an active object, and both his arms are seperate active objects with the weapon anmations.

 
-

Del Duio

Born in a Bowling Alley

Registered
  29/07/2005
Points
  1078

GOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!Evil klikerHasslevania 2!The OutlawSanta Boot
3rd July, 2006 at 11:41:38 -

Does Bob the Schizo have points where the arms are "off" a bit? I tried using a separate object for my weapons in Captain of the Guard, but sometimes the weapon wouldn't synch up correctly or disappear a nanosecond too early. I even had it to always set too. Weird huh?

Since then I've been making the weapon a part of the actual picture, so that those problems don't happen anymore. It would be nice to use separate weapons or body parts on occasion though.

 
--

"Del Duio has received 0 trophies. Click here to see them all."

"To be a true ninja you must first pick the most stealthy of our assorted combat suits. Might I suggest the bright neon orange?"

DXF Games, coming next: Hasslevania 2- This Space for Rent!

colej_uk



Registered
  15/05/2002
Points
  1627
3rd July, 2006 at 14:49:28 -

I think I know what you mean, and the way around that is to move the arms whenever the player object is moved.

For example, in the platform engine when pressing right=Bob to move X+1, also give that X+1 event to the arms so they won't lag.
If you have an main object with a built in movement, for example bouncng ball, you can also give the same movement (and speed, direction etc) to the other object.


 
-

markno2



Registered
  06/06/2006
Points
  865

Game of the Week WinnerVIP MemberPicture Me This Round 30 Winner!Weekly Picture Me This Round 39 Winner!Kliktober Special Award Tag
4th July, 2006 at 09:31:53 -

How do you get the animation in sync with Fox's method because you can use default platform movement

 
Discarded pizza boxes are an indispensable source of cheese.

Duncan

Thelonious Dunc

Registered
  18/05/2002
Points
  552

VIP Member
4th July, 2006 at 09:46:56 -

Concerning lag: listen to Nick because he's RIGHT.

 
n/a
   

Post Reply



 



Advertisement

Worth A Click