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

Post Reply  Post Oekaki 
 

Posted By Message

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
30th June, 2006 at 15:03:39 -

What's the best way to have a character change fire-arm weapons??

 
Discarded pizza boxes are an indispensable source of cheese.

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
30th June, 2006 at 15:07:43 -

Id make the weapons different active object with the same hotspots as the main character object, then put the weapons in different groups and activate/deactivate when required. Then again I cant program so Ill probably be told off in a moment for suggesting a silly method

 
n/a

David Newton (DavidN)

Invisible

Registered
  27/10/2002
Points
  8322

Honored Admin Alumnus
30th June, 2006 at 15:07:55 -

Have one group of events for one weapon, another for the other, and activate/deactivate them as necessary.

 
http://www.davidn.co.nr - Games, music, living in America

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
30th June, 2006 at 15:11:30 -

I want to alter the character's appearance, whatever is fired is not important.

 
Discarded pizza boxes are an indispensable source of cheese.

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
30th June, 2006 at 15:11:51 -

Yay

 
n/a

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
30th June, 2006 at 15:20:36 -

It can still be done in this way I think? Use the original character as a template etc.

 
n/a

David Newton (DavidN)

Invisible

Registered
  27/10/2002
Points
  8322

Honored Admin Alumnus
30th June, 2006 at 18:41:07 -

Yes, to add to my strangely parallel post, I'd say Adam's way is as good as any.

 
http://www.davidn.co.nr - Games, music, living in America

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
30th June, 2006 at 18:44:47 -

Im so proud of myself

 
n/a

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
30th June, 2006 at 18:50:05 -

In my latest game the character wears a purple handbag. To do this I cloned the character sprite and drew the handbag on top the cloned-objects frames, then scribbled over the remaining character with invisible, leaving just the hangbag.
It works perfectly, he looks like a transexual but hey!

Example;

Image



Image Edited by the Author.

 
n/a

Retired Kliker Lazarus

The Ed Wood JR of TDC

Registered
  18/07/2003
Points
  7363
30th June, 2006 at 19:45:59 -

Awww...such a hideous creature, DD.

 
Fine Garbage since 2003.
CURRENT PROJECT:
-Paying off a massive amount of debt in college loans.
-Working in television.

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
30th June, 2006 at 19:57:03 -

Excuse me? Hes no such thing!

 
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
1st July, 2006 at 00:55:39 -

Hey that method causes the weapon to lag behind the rest of the character

 
Discarded pizza boxes are an indispensable source of cheese.

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 06:22:01 -

Yeah I think it can do this, its happened to me before.

 
n/a

..:.Phox.:..



Registered
  18/02/2005
Points
  646

VIP MemberHero of TimeI like Aliens!Cardboard BoxAttention Getter
1st July, 2006 at 06:43:42 -

make an active object the you will call "the REAL player" make him invisible, and make HIM have all the control and movement. Make him invisible.
Then make an active object called "MASK player" this is the player that we will see, but not really the one we are moving around. make him always position himself to the "REAL player", and always have the "REAL player"'s animations that when you are moving the Real one, the mask is doing a walking animation and appear to be walking.

after this is done do the same to the object that will come allong with the Mask player (e.g. Gun/Handbag/"anything") and make it always position it'self to the "REAL player".

Now that should make it be always in place and not lag behind the character.

and there you have it.

 
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 06:47:07 -

HEY the handbag is mine, dont use that

 
n/a

-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