Spell System: Firsts steps... how?
by Marcos - NGames · in Torque 3D Professional · 05/18/2011 (6:45 am) · 5 replies
Good morning staff
I'm having a basic difficulty to start sketching something. I want to make a magic system in my game. Spells involve projectiles, buffs, conspiracy, etc. (as in RPG, but it's not that I'm creating an RPG is to a third person shooter: D). I wonder what is the best way to create it. Actually like the first steps to create.
I thought of making like weapons. But not to fit all sorts of magic believe it. Besides also not be possible to control mana and animations without weapon, so do not change the whole script already done.
and then? Does anyone have an idea how I can get it?
by: Marcos and Google Translator
Note: The funny thing is that my wife is an English teacher ... I'm going to get rid of google!
I'm having a basic difficulty to start sketching something. I want to make a magic system in my game. Spells involve projectiles, buffs, conspiracy, etc. (as in RPG, but it's not that I'm creating an RPG is to a third person shooter: D). I wonder what is the best way to create it. Actually like the first steps to create.
I thought of making like weapons. But not to fit all sorts of magic believe it. Besides also not be possible to control mana and animations without weapon, so do not change the whole script already done.
and then? Does anyone have an idea how I can get it?
by: Marcos and Google Translator
Note: The funny thing is that my wife is an English teacher ... I'm going to get rid of google!
About the author
N41 - Digital Solutions
#2
Use a dummy or imvisible shapeImage for the spell "in-hand". These 'fake' images can in turn have various emitters, sounds, etc as per the statemanagement system for images. Each state could also run a specific script event which would let you place decals, play animations, and have more complicated things than just projectiles fired from a magic gun.
Mana management could easily be represented by energy, which would allow you to use the setEnergy() method to increase/decrease mana as needed.
05/19/2011 (11:49 am)
Scripted magic could work similar to how weapons do. There are a couple Resources that implement a magic or spell system - may have to get creative with the search in order to find them though ;)Use a dummy or imvisible shapeImage for the spell "in-hand". These 'fake' images can in turn have various emitters, sounds, etc as per the statemanagement system for images. Each state could also run a specific script event which would let you place decals, play animations, and have more complicated things than just projectiles fired from a magic gun.
Mana management could easily be represented by energy, which would allow you to use the setEnergy() method to increase/decrease mana as needed.
#3
Michael: One question Michael, I create new files following the idea of weapons or use actual script I use weapons to complement a new script?
(actually I think I need to go deeper on the functioning of the scripts: ()
05/20/2011 (9:30 am)
Donald Teal: Thanks for the indication, read about AFX2 the site but would like to create a system to own up to improve my knowledge with the torque (though the proposal is tempting! lol)Michael: One question Michael, I create new files following the idea of weapons or use actual script I use weapons to complement a new script?
(actually I think I need to go deeper on the functioning of the scripts: ()
#4
Something extremely basic would be to modify the rocketlauncher to use a wand shaped object, or an invisible shape, glowing rock, etc, instead of the current gun shape. From there you could modify the projectile and explosion effects to make it more like a fireball and then remove the ammo dependency for the 'weapon' and make it use energy. Now you have a mage casting fireballs instead of shooting a gun.
As you can see, this idea simply follows the same principle as the normal gun-type weapons, but it's your own creative ideas that can make the 'gun' more than just a rocket or bullet shooter.
Something a bit more complicated would be to use a raycast and 'summon' a lightning bolt to strike the point you're looking at. Very doable through script. Or use a raycast and then applyImpulse() at the target for a force push/pull telekinesis effect.
Something not so weaponish: set a keybind to toggle the startFade() functionality on and off. That will give you an invisiblity spell.
05/20/2011 (10:00 am)
Use an existing weapon script/datablock as a template until you're more familiar with ShapeBaseImages and the statesystem. Something extremely basic would be to modify the rocketlauncher to use a wand shaped object, or an invisible shape, glowing rock, etc, instead of the current gun shape. From there you could modify the projectile and explosion effects to make it more like a fireball and then remove the ammo dependency for the 'weapon' and make it use energy. Now you have a mage casting fireballs instead of shooting a gun.
As you can see, this idea simply follows the same principle as the normal gun-type weapons, but it's your own creative ideas that can make the 'gun' more than just a rocket or bullet shooter.
Something a bit more complicated would be to use a raycast and 'summon' a lightning bolt to strike the point you're looking at. Very doable through script. Or use a raycast and then applyImpulse() at the target for a force push/pull telekinesis effect.
Something not so weaponish: set a keybind to toggle the startFade() functionality on and off. That will give you an invisiblity spell.
#5
PS: Excellent idea about the invisibility spell lol
05/20/2011 (1:45 pm)
Hey thanks a lot Michael! I'll try and post the result here!PS: Excellent idea about the invisibility spell lol
Torque Owner Donald Teal
Duck's Den Productions Inc