Enderal SE https://mod.pub/enderal-se/38-enderal-se
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
846 B
30 lines
846 B
5 months ago
|
scriptName defaultLinkRefStartCombatPlayer extends objectReference
|
||
|
{trigger that causes linked ref to attack player (or other actor if property is over-ridden on local ref}
|
||
|
|
||
|
objectReference property victim auto
|
||
|
{by default, the player}
|
||
|
actor property attacker auto hidden
|
||
|
bool property makeAggressive = false auto
|
||
|
|
||
|
auto STATE waiting
|
||
|
EVENT onTriggerEnter(objectReference actronaut)
|
||
|
attacker = self.getLinkedRef() as actor
|
||
|
|
||
|
if attacker.isDead() == true || attacker.isinCombat() == true
|
||
|
; don't do a thing if the attacker is dead or already in combat
|
||
|
|
||
|
elseif actronaut as actor == victim
|
||
|
attacker.startCombat(victim as actor)
|
||
|
if makeAggressive == true
|
||
|
attacker.setActorValue("aggression", 3)
|
||
|
endif
|
||
|
gotoState("inactive")
|
||
|
self.delete()
|
||
|
endif
|
||
|
endEVENT
|
||
|
endSTATE
|
||
|
|
||
|
STATE inactive
|
||
|
; nothing happens here.
|
||
|
endSTATE
|