any idea why this cast spell function isn't displaying the effect? [resolved]
by michael bailey · in Torque Game Builder · 03/19/2009 (9:57 pm) · 6 replies
i just bound this to space for a test. in console you see the echos. but no effect shows up even with different xy in setPosition... really frustrating me :(
function castSpell()
{
%sn="darkbolt";
%dmg=10;
%effect = new t2dParticleEffect() { scenegraph = mySceneGraph; };
%effect.loadEffect( "~/data/particles/" @ %sn @ ".eff" );
%effect.setPosition(-6, -3);
%effect.setEffectLifeMode( "INFINITE" );
%effect.playEffect();
%effect.setLinearVelocityX(10);
echo("castspell ~/data/particles/" @ %sn @ ".eff");
}About the author
#2
03/20/2009 (8:24 am)
project button -> edit -> script name
#3
03/20/2009 (9:58 am)
Sorry, but I don't use the editor, so I'm not entirely sure what you mean. In your level file, is the scenegraph explicitly named 'myScenegraph'?
#4
03/20/2009 (3:32 pm)
yes
#5
03/21/2009 (8:08 am)
anyone have any ideas... all my scenegraph names are set correctly i even manually checked the code in my level... i can't find any errors :(
#6
03/21/2009 (8:47 am)
for some reason it wouldnt work with my minimap gui loaded. even tho the scene name is different.... not sure why this would be the conflict but spells work now thats more important than the minimap
Torque 3D Owner Jason Ravencroft