Page 1 of 2
Spell in RPG mode Problems
Posted: August 12th, 2010, 6:29 pm
by owenisred
spawn_airpulse = [
r_type 2
r_icon arrow
r_description "Pulse of Air"
r_name "Air Pulse"
r_spell_effect 2
r_spell_cost 1
r_spell_range 0.1
r_spell_gravity 0
r_addeffect $STATUS_HEALTH -10 $ATTACK_MAGIC
r_proj_trail 1
r_proj_trailpart 3
r_proj_trailcol 0xFFBF00
r_proj_trailsize i
r_proj_trailfade 500
r_interact [
r_select $rpg interact
r_pickup $rpgself
]
]
Anyone tell me why I can't get the air pulse spell to have a trail...
It says something is wrong with the r_proj_trail command, but its in the list...
Thanks,
Owen.
EDIT: for some reason, the forum removes the indents I have made, but believe me theyre there

Re: Spell in RPG mode Problems
Posted: August 12th, 2010, 6:34 pm
by chocolatepie33
For r_proj_trailpart, you need something like $PART_LIGHTNING
Re: Spell in RPG mode Problems
Posted: August 12th, 2010, 7:12 pm
by owenisred
fair enough, ill try that, however I tought the 3 should refer to a particle type anyway.
On the other hand the game DOES say that theres something with r_proj_trail ...
Ill see about it tomorrow, im tired atm
Re: Spell in RPG mode Problems
Posted: August 13th, 2010, 6:35 am
by owenisred
yea it still says
unknown command r_proj_trail
:S
Re: Spell in RPG mode Problems
Posted: August 13th, 2010, 6:45 am
by owenisred
Also when I loooked into the game_rpg.cfg file, the fireball spell doesnt have any particles attached to it, yet in game particles come off it all the time!
spawn_spell = [
r_type 2
r_icon fire
r_description "FIRE!!!"
r_name "fireball"
r_spell_type $STYPE_TARGET
r_spell_gravity 20
r_spell_cost 20
r_spell_range 64
r_addeffect $STATUS_HEALTH -40 1 $ATTACK_MAGIC
r_addeffect $STATUS_HEALTH -30 5000 (| $ATTACK_FIRE $ATTACK_MAGIC)
r_interact [
r_select $rpginteract
r_pickup $rpgself
]
]
Re: Spell in RPG mode Problems
Posted: August 13th, 2010, 4:32 pm
by arcones
That's because you don't need the particles. Check out my tutorial:
Creating easy spells
You don't need the projectile stuff, it's in the addeffects

Re: Spell in RPG mode Problems
Posted: August 13th, 2010, 4:57 pm
by owenisred
Ok, I see a particles part at the bottom of the .cfg file now. I still dont understand how they relate to the spells above.
for example
r_proj_new //effect 1
r_proj_projcol 0x3F8FFF
r_proj_projpart $PART_FIREBALL2
r_proj_projsize 2.5
r_proj_gravity 200
r_proj_lightradius 32
r_proj_lightcolour 0x3F8FFF
r_proj_deathpartcol 0x3F8FFF
r_proj_deathlightinitcol 0x3F8FFF
r_proj_deathlightfade 500
r_proj_deathdecal -1
Obviously this has something to do with the fireball spell, I just dont see anywhere in the script anything that connects the two files.
Also I want to say. I see a lot of people saying in response to questions (particularly about scripting) look at the wiki, look at the FAQ. I promise you I have. I have printouts of
http://sandboxgamemaker.com/wiki/index. ... Cubescript
viewtopic.php?f=24&t=1317
http://sandboxgamemaker.com/platinumart ... itref.html
among many others stuck on my wall, to help me. Everytime I understand something, I realise how simple it was, but when faced with something new, it takes me a long time to understand it. Please don't think as soon as I come up against the first problem I post here
Thanks guys, your help is much appreciated,
Owen.
Re: Spell in RPG mode Problems
Posted: August 15th, 2010, 7:07 pm
by chocolatepie33
Those particles affect how the spell looks, so when it hits/kills something, it changes color to whatever color the hexadecimal is.
If you changed r_proj_projcol to a different hexadecimal color, it would change the fireball to a different color.
Re: Spell in RPG mode Problems
Posted: August 16th, 2010, 4:01 am
by owenisred
Thanks for the reply, my problem is that I dont understand how the spells relate to the particles
in a script.
spawn_spell = [
r_type 2
r_icon fire
r_description "FIRE!!!"
r_name "fireball"
r_spell_type $STYPE_TARGET
r_spell_gravity 20
r_spell_cost 20
r_spell_range 64
r_addeffect $STATUS_HEALTH -40 1 $ATTACK_MAGIC
r_addeffect $STATUS_HEALTH -30 5000 (| $ATTACK_FIRE $ATTACK_MAGIC)
r_interact [
r_select $rpginteract
r_pickup $rpgself
]
]
Is the fireball spell.
Where is there a mention of particles? Why does the fireball spell take the fireball particles, and not the frost particles, or indeed any particles at all?
Re: Spell in RPG mode Problems
Posted: August 16th, 2010, 4:19 am
by Runescapedj
Maybe it's the (| $ATTACK_FIRE $ATTACK_MAGIC) part?