[Logo]
 
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Little Problem with RPGDeathAbility and Ultima  XML
Forum Index -> Druids RPG Development
Author Message
BotFodder

Wicked Sick!
[Avatar]

Joined: 01/13/2006 15:23:41
Messages: 1239
Location: Florida
Offline

In an ideal universe, anything we'd want to run during a "death" sequence, whether or not the death is going to be prevented, should have a PotentialDeathPending function to trigger it off. I've currently got Ultima set to use this function:
Code:
 static function PotentialDeathPending(Pawn Killed, Controller Killer, class<DamageType> DamageType, vector HitLocation, int AbilityLevel)
 {
         if (!Killed.Level.Game.IsA('ASGameInfo'))
                 class'AbilityUltima'.static.PreventDeath(Killed, Killer, DamageType, HitLocation, AbilityLevel, False); 
         return;
 }

Looks right, right? Wrong. AbilityUltima (from Mysterial's mod):
Code:
 static function bool PreventDeath(Pawn Killed, Controller Killer, class<DamageType> DamageType, vector HitLocation, int AbilityLevel, bool bAlreadyPrevented)
 {
 	if (!bAlreadyPrevented && Killed.Location.Z > Killed.Region.Zone.KillZ && Killed.FindInventoryType(class'KillMarker') != None)
 		Killed.spawn(class'UltimaCharger', Killed.Controller).ChargeTime = 4.0 / AbilityLevel;
 
 	return false;
 }

And then the pertinent lines from UltimaCharger:
Code:
 auto state Charging
 {
 Begin:
 	if (Instigator != None && Instigator.Health > 0)
 		Destroy();

This is why the original Ghost actually directly launched a Druid class called GhostUltimaCharger. So the Ulitma lines will be put back in Ghost as soon as I'm done alpha testing.

I use the Futurama Prof. Farnsworth Skin: http://www.disastrousconsequences.com/dcforum/posts/list/1595.page
WM: (DC)BotFodder 170
MM: (DC)BotDoctor 141
AM: (DC)BotBooster 147
http://ericdives.com/ - My DC Newbie FAQ: http://tinyurl.com/lz229
Twitter: http://twitter.com/ericdives
[WWW] aim icon [MSN]
TheDruidXpawX

Wicked Sick!
[Avatar]

Joined: 12/19/2004 18:32:13
Messages: 1946
Offline

Crap... I'd rather fix the ultima charger than trigger it from gost. Thoughts?

Skin download: http://www.disastrousconsequences.com/dcforum/posts/list/1189.page

The fundamental problem is this: The first word we learn as children is NO. From that point forward society teaches women that saying no isn't polite, and society teaches men to respect those who wont take no for an answer.

The world is what you make of it, my friend. If it doesn't fit, you make alterations. -- Stella, The Morning Star
BotFodder

Wicked Sick!
[Avatar]

Joined: 01/13/2006 15:23:41
Messages: 1239
Location: Florida
Offline

Well, I was thinking about this last night (as I was trying to get to sleep) and since you already have a GhostUlitmaCharger, we could just ... um ... "borrow" ... the pertinent code from the original Ultima like you did with Ghost. In other words, change DruidUlitma's PotentialDeathPending, so that instead of firing off AbilityUltima's.PreventDeath, it does what AbilityUlitma.PreventDeath does with one small change:
Code:
 static function PotentialDeathPending(Pawn Killed, Controller Killer, class<DamageType> DamageType, vector HitLocation, int AbilityLevel)
 {
          if(!Killed.Level.Game.IsA('ASGameInfo') && Killed.Location.Z > Killed.Region.Zone.KillZ &&
            Killed.FindInventoryType(class'KillMarker') != None)
  		Killed.spawn(class'GhostUltimaCharger', Killed.Controller).ChargeTime = 4.0 / AbilityLevel;
  
          return;
 }

This would completely replace any usage of Mysterial's UltimaCharger with GhostUltimaCharger.

If this isn't in by the time I get home, I'll try it out and then commit it if it works as desired.

If someone else does this, remember to take the Ultima launch out of Ghost too!

I use the Futurama Prof. Farnsworth Skin: http://www.disastrousconsequences.com/dcforum/posts/list/1595.page
WM: (DC)BotFodder 170
MM: (DC)BotDoctor 141
AM: (DC)BotBooster 147
http://ericdives.com/ - My DC Newbie FAQ: http://tinyurl.com/lz229
Twitter: http://twitter.com/ericdives
[WWW] aim icon [MSN]
BotFodder

Wicked Sick!
[Avatar]

Joined: 01/13/2006 15:23:41
Messages: 1239
Location: Florida
Offline

Works. Fixed. Committed.

I use the Futurama Prof. Farnsworth Skin: http://www.disastrousconsequences.com/dcforum/posts/list/1595.page
WM: (DC)BotFodder 170
MM: (DC)BotDoctor 141
AM: (DC)BotBooster 147
http://ericdives.com/ - My DC Newbie FAQ: http://tinyurl.com/lz229
Twitter: http://twitter.com/ericdives
[WWW] aim icon [MSN]
TheDruidXpawX

Wicked Sick!
[Avatar]

Joined: 12/19/2004 18:32:13
Messages: 1946
Offline

Ok!

Skin download: http://www.disastrousconsequences.com/dcforum/posts/list/1189.page

The fundamental problem is this: The first word we learn as children is NO. From that point forward society teaches women that saying no isn't polite, and society teaches men to respect those who wont take no for an answer.

The world is what you make of it, my friend. If it doesn't fit, you make alterations. -- Stella, The Morning Star
 
Forum Index -> Druids RPG Development
Go to: