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.
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.
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.
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.
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
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
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.
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.
^^ 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!
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!
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?