This repository has been archived by the owner on Jun 12, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added monster summoning totems. Totem summons and picked up companion…
…s are now affected by monster buffing abilties. Signed-off-by: Patrick Dinklage <pdinklag@googlemail.com>
- Loading branch information
Showing
5 changed files
with
101 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
class FX_SummonBeam extends FX_Beam; | ||
|
||
defaultproperties { | ||
Skins(0)=FinalBlend'XEffectMat.LinkBeamRedFB' | ||
LifeSpan=1.5 | ||
LightHue=0 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
class TotemIcon_MonsterSummon extends RPGTotemIcon; | ||
|
||
defaultproperties { | ||
StaticMesh=StaticMesh'Editor.TexPropSphere' | ||
Physics=PHYS_None | ||
Skins(0)=TexEnvMap'wm_textures.Effects.wm_EnvMap1' | ||
DrawScale=0.17 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
class Totem_MonsterSummon extends RPGTotem CacheExempt; | ||
|
||
var config float InitialDelay, Interval; | ||
var config array<class<Monster> > MonsterTypes; | ||
|
||
auto state Active { | ||
event BeginState() { | ||
SetTimer(InitialDelay, false); | ||
} | ||
|
||
function Timer() { | ||
local class<Monster> Type; | ||
local vector Off; | ||
local int Tries, i; | ||
local Monster M; | ||
local Controller Master; | ||
local FriendlyMonsterController C; | ||
local FX_SummonBeam Beam; | ||
local RPGPlayerReplicationInfo RPRI; | ||
|
||
Master = RPGTotemController(Controller).Master; | ||
if(Master != None && Master.Pawn != None && MonsterTypes.Length > 0) { | ||
Type = MonsterTypes[Rand(MonsterTypes.Length)]; | ||
|
||
while(M == None && Tries < 25) { | ||
Tries++; | ||
|
||
Off = VRand() * 2.5 * (CollisionRadius * DrawScale + Type.default.CollisionRadius * Type.default.DrawScale); | ||
Off.Z = 32; | ||
|
||
M = Master.Pawn.Spawn(Type, Master,, Location + Off, rotator(Off)); | ||
if(M != None) { | ||
if(M.Controller != None) | ||
M.Controller.Destroy(); | ||
|
||
C = Spawn(class'FriendlyMonsterController',,, M.Location, M.Rotation); | ||
C.Possess(M); | ||
C.SetMaster(Master); | ||
|
||
RPRI = class'RPGPlayerReplicationInfo'.static.GetFor(Master); | ||
if(RPRI != None) { | ||
for(i = 0; i < RPRI.Abilities.Length; i++) { | ||
if(RPRI.Abilities[i].bAllowed) | ||
RPRI.Abilities[i].ModifyMonster(M, Master.Pawn); | ||
} | ||
} | ||
|
||
Beam = Instigator.Spawn(class'FX_SummonBeam', Icon); | ||
Beam.LinkedPawn = M; | ||
break; | ||
} | ||
} | ||
} | ||
|
||
SetTimer(Interval, true); | ||
} | ||
} | ||
|
||
defaultproperties { | ||
InitialDelay=5.0 | ||
Interval=45.0 | ||
MonsterTypes(0)=class'SkaarjPack.Krall' | ||
|
||
IconClass=class'TotemIcon_MonsterSummon' | ||
VehicleNameString="Summoning Totem" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters