Site  •  Wiki  •  FAQ  •  Login

Spellcasting Animation Problems

<<

Debardus

Posts: 45

Joined: June 8th, 2009, 5:35 am

Post July 25th, 2009, 1:11 pm

Spellcasting Animation Problems

Quick rundown:

I want to make a 'nova' type spell for a unit I have. The nova should be able to be targeted on terrain (think plague). The unit has other spells too, so I cannot use the 'CastSpell' animation header.

What I've tried:

I've tried using the 'castspell' opcode under a different iscript header. This did not work. When I tried to cast the spell, the weapon did not fire and a zerg egg sprite was spawned.

I've tried using 'attackwith 1' in the animation. This kind of works - but it doesn't seem to like being targeted on terrain. Rather, it targets, but the weapon does not fire unless I click on an actual target.

Has anyone ever done anything like this before? A fix to either of my two attempts or an entirely new solution would be greatly appreciated.
<<

TassadarZeratul

User avatar

Posts: 288

Joined: June 7th, 2009, 1:00 am

Location: Behind myself

Post July 25th, 2009, 2:14 pm

Re: Spellcasting Animation Problems

Go into orders.dat and change the spell to use a different animation (eg Unused1). Then write your spellcast animation under the new header. It's worked for me in the past. Or, if that doesn't work for whatever reason, you could assign each spell a different animation and useweapon the spells in the appropriate animation, leaving CastSpell free for your nova.

A few more details might help, btw. :P
Image
<<

Debardus

Posts: 45

Joined: June 8th, 2009, 5:35 am

Post July 26th, 2009, 7:34 am

Re: Spellcasting Animation Problems

Your first idea is what I already tried to do - perhaps I wasn't clear in my first post? The second one is... possible, but I'd have to rework a number of spells to fire without projectiles. And I'd rather not do that because it'd make them assholes to balance.
<<

TassadarZeratul

User avatar

Posts: 288

Joined: June 7th, 2009, 1:00 am

Location: Behind myself

Post August 27th, 2009, 11:41 am

Re: Spellcasting Animation Problems

*TassadarZeratul casts Level 42 Necromancy*

I just realized something. Does the unit in question have an attack? If so, why not just make the nova spell an alt attack that goes off randomly, at the same rate as a player would be able to cast it if it was a real spell?
Image
<<

Hercanic

User avatar

Site Admin

Posts: 478

Joined: June 6th, 2009, 12:25 am

Location: Korea

Post August 27th, 2009, 12:18 pm

Re: Spellcasting Animation Problems

While that would work for simply getting the nova attack into the game, having it be random takes away the decision of when to use the ability out of the player's hands. The effectiveness of the ability depends on positioning and timing, neither of which can be planned reliably due to the unpredictable nature of a random nova.

Luck-based attacks tend to add little to gameplay for players, aside from the visual spectacle, because the player's choices are not a factor in activation. The ability cannot be tactically deployed, only hoped for.

Perhaps consider another approach involving an alternate attack, but not have it be random. Does the unit even have a normal attack to begin with, or is this a High Templar/Defiler type of unit?

Though one problem remains either way -- the inability to target the attack on terrain.

If this nova is important to your gameplay, Debardus, I would consider moving the other spells to another unit and taking the traditional approach with nova spells. If the other spells form a vital synergy on your unit, you might just have to accept that the nova can only be targetted on a unit.
<<

BroodKiller

User avatar

Posts: 134

Joined: June 6th, 2009, 3:46 am

Post September 1st, 2009, 4:11 am

Re: Spellcasting Animation Problems

Hmm..I remember doing something along these lines some time ago. It was a terrain-targeted lockdown IIRC. I don't have my SC on me right now, so can't check to be 100% sure, but if memory serves me well, I changed the weapon behaviour, targeting flags, and forced the use of that particular weapon through iscript. I was not using a default weapon though, I think, but the lockdown spell itself. Dunno if that helps, I might check it next week, after I have returned.
Clean...simple...devious. I like it.
<<

Debardus

Posts: 45

Joined: June 8th, 2009, 5:35 am

Post September 9th, 2009, 1:14 pm

Re: Spellcasting Animation Problems

This forum has no multiquote - bah.

@TZ - Herc pretty much covered it. Random wouldn't do.

@Herc - I was planning on making an arena-type map thingy with a number of different spells the player could cast. This was going to be one of them, but I could only get it to target units so this particular project sort of faded away. I might come back to it if I feel inspired, though.

@BK - Casting spells on terrain isn't the problem - this is done very easily. It's casting a nova style spell on terrain that creates the issues.

Return to Help!

Who is online

Users browsing this forum: No registered users and 1 guest

cron
phpBBST Software