The Daily Click ::. Forums ::. Klik Coding Help ::. pinning weapons or swords
 

Post Reply  Post Oekaki 
 

Posted By Message

\/\/olf

Creative Genius

Registered
  06/08/2005
Points
  76

VIP Member
6th November, 2007 at 20:21:23 -

hey, does anyone have any idea how to pin a sword to an active object's hand?? so that when the hero walks, the sword comes along with him, fixed on his hand. i know it can be done if all the hotspots are set to the hand but cant it be done using action points? is there some other method as well?? any help will be most appreciated as always.

 
Image

www.OldMansTale.net
Sign the Petition! Go go Go!!

Ricky

loves Left For Dead 2

Registered
  28/12/2006
Points
  4175

Has Donated, Thank You!Game of the Week WinnerVIP MemberWii OwnerHero of TimeGOTM Winner! - November 2009I am an April Fool
6th November, 2007 at 20:44:47 -

You don't want the hotspot on the hand, cause it will move. It can be done with action points.

EX:
Flag 0 is on (that means you grabbed it, its no longer on the ground)
Set X coordinates of "Sword" to XActionPoint( "Dude" )
Set Y coordinates of "Sword" to YActionPoint( "Dude" )

Note: make sure you put the swords hotspot on the handle.

 
-

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
6th November, 2007 at 20:51:27 -

I recently discovered action points are extremely useful

 
n/a

Ricky

loves Left For Dead 2

Registered
  28/12/2006
Points
  4175

Has Donated, Thank You!Game of the Week WinnerVIP MemberWii OwnerHero of TimeGOTM Winner! - November 2009I am an April Fool
6th November, 2007 at 21:00:08 -

I made a snake, made out of multiple objects. Each had an action point on one end, and a hotspot on the other. The hotspots would attach the action points. This allowed me to make the snake flexible and have all kinds of dynamic movements.

 
-

Windybeard Games



Registered
  14/04/2005
Points
  219

You've Been Circy'd!VIP MemberCandy Cane
6th November, 2007 at 21:28:20 -

i find having the weapon carrying arm as a seperat active, that way its much easier to attach as the upper body rarely moves in comparison to a hand.

Image Edited by the Author.

 
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
6th November, 2007 at 21:33:18 -

In my latest game its just another active too, which is animated in the same way as the character, and the I just link the number of the weapon's frame to the player's.

<_< prolly the wrong way to do it. Oh well

 
n/a

Windybeard Games



Registered
  14/04/2005
Points
  219

You've Been Circy'd!VIP MemberCandy Cane
6th November, 2007 at 21:46:23 -

another good method is to have the actual controllable active to be invisible, then you can build your character around that without any annoying lag. this way you can have seperate helmets, armour, arms, legs, feet etc and they will fit seamlessly by just using the "always set x/y to...."

 
n/a

Peblo

Custom ratings must be 50 characters or less

Registered
  05/07/2002
Points
  185

Game of the Week WinnerVIP MemberI'm on a Boat360 OwnerAttention GetterThe Cake is a LieCardboard BoxHero of TimePS3 OwnerIt's-a me, Mario!
I'm a Storm TrooperSonic SpeedStrawberryI like Aliens!Wii OwnerMushroomGhostbuster!
6th November, 2007 at 23:37:42 -


Originally Posted by Ricky Garces
I made a snake, made out of multiple objects. Each had an action point on one end, and a hotspot on the other. The hotspots would attach the action points. This allowed me to make the snake flexible and have all kinds of dynamic movements.



That's a great idea! I guess there are solutions to absolute math.

 
"Isn't it always amazing how we characterize a person's intelligence by how closely their thinking matches ours?"
~Belgarath

\/\/olf

Creative Genius

Registered
  06/08/2005
Points
  76

VIP Member
7th November, 2007 at 00:28:23 -

yeah, i thought it would be something like that but when i put xactionpoint("active1"), it gives me a syntax error. also, when i use the 'retrieve from an object' command, i dont get any mention of hotspot or actionpoint when i rightclick the object. only positions such as xcoordinate, ycoordinate, rightedge, etc.

 
Image

www.OldMansTale.net
Sign the Petition! Go go Go!!

\/\/olf

Creative Genius

Registered
  06/08/2005
Points
  76

VIP Member
7th November, 2007 at 00:30:49 -

i found it. its not in the 'set x pos' or 'set y pos' command. rather, i had to use 'set position' and then click options. thanks

 
Image

www.OldMansTale.net
Sign the Petition! Go go Go!!

Ricky

loves Left For Dead 2

Registered
  28/12/2006
Points
  4175

Has Donated, Thank You!Game of the Week WinnerVIP MemberWii OwnerHero of TimeGOTM Winner! - November 2009I am an April Fool
7th November, 2007 at 00:36:58 -

its there for me. are you using something old like tgf

Image Edited by the Author.<a href="http://photobucket.com" target="_blank">Image

Image Edited by the Author.

 
-

~Zigzag~



Registered
  13/03/2007
Points
  292

Game of the Week WinnerSilverNova Member
7th November, 2007 at 00:57:16 -

... I have never noticed that.... Ever!

 
http://www.SilverNova.co.uk

\/\/olf

Creative Genius

Registered
  06/08/2005
Points
  76

VIP Member
7th November, 2007 at 01:02:46 -

no, multimedia fusion. weird....

 
Image

www.OldMansTale.net
Sign the Petition! Go go Go!!

chrilley

Insane Beaver

Registered
  05/01/2002
Points
  704

Game of the Week WinnerVIP Member360 Owner
7th November, 2007 at 06:53:08 -

I believe that expression is a new one? I can't find it in MMF1.

Image Edited by the Author.

 
Image

Pixelthief

Dedicated klik scientist

Registered
  02/01/2002
Points
  3419

Game of the Week WinnerWeekly Picture Me This Winner!You've Been Circy'd!VIP MemberI like Aliens!Evil klikerThe SpinsterI donated an open source project
7th November, 2007 at 10:31:32 -

Use the "Set position to X/Y" command, which prompts you to pick a position/object in the level editor. Then, when you select your object, click on the options/advanced button, and select "According to Action Point". This will work for TGF and MMF1.


However, you will run into extreme problems if you want to have more then 1 instance of this object attached to another object. For example, if you want to have an enemy who carries a seperate gun object. You can find some workarounds with extensions like the EE's mother/child object, but the best way to go about doing this is having each character have a unique value as an index, and running a fastloop which sorts through all the index's and sets each set of gun/character to the right position.

 
Gridquest V2.00 is out!!
http://www.create-games.com/download.asp?id=7456

-Liam-

Cake Addict

Registered
  06/12/2008
Points
  556

Wii OwnerIt's-a me, Mario!Hero of TimeStrawberry
7th November, 2007 at 10:45:03 -

Whenever I do this the object lags behind the position it's meant to be at when the objects is moving

 
Image

Tell 'em Babs is 'ere...

Ricky

loves Left For Dead 2

Registered
  28/12/2006
Points
  4175

Has Donated, Thank You!Game of the Week WinnerVIP MemberWii OwnerHero of TimeGOTM Winner! - November 2009I am an April Fool
7th November, 2007 at 10:48:45 -

To avoid the lag you must use a custom movement engine. And put these events after the movement ones.

 
-

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
7th November, 2007 at 11:22:44 -

^^ You may also have instances where the weapon will disappear / appear a millisecond before it's supposed to regardless. ^^

I made Captain of the Guard have a separate active for the weapon attach to the player's action point and it happened all the time. Although it would be a lot more time consuming, I'd suggest making the weapon part of the animation frame itself (with the guy). I did this with Hasslevania. Then what you do, is set the action point to the point of the sword (or whatever) and always set a small invisible active picture to your guy's action point. Then, when it comes to damaging your enemy, just check to see if your guy's attack animation is playing AND your invisble weapon box is overlapping the enemy. If it is, BAM! Damage time!

Image Edited by the Author.

 
--

"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!

\/\/olf

Creative Genius

Registered
  06/08/2005
Points
  76

VIP Member
9th November, 2007 at 17:33:36 -

yes, i did have the damage box thing in mind but if it all goes according to plan, i wont really need it. hopefully, ill release a demo of the game soon once the main features are implemented. also, would the 3e object work better? the parent child object?

 
Image

www.OldMansTale.net
Sign the Petition! Go go Go!!
   

Post Reply



 



Advertisement

Worth A Click