I made a new level called the-eye-of-the-fortress and I’m trying to program Zana to attack the ogres because there is nothing that makes her attack automatically. Somehow, she keeps attacking herself and this is a problem with all my other heroic sprites (except commendable types).
Here is my code:
existence. Exists This Thang exists and takes part in the level simulation.
stateless:
false
exists:
true
physics. Physical This Thang has physical presence (position, size, shape).
pos:
(21.650000000000002, 41.69, 1)
width:
1m
height:
1m
depth:
1m
rotation:
0rad (0˚)
shape:
“ellipsoid”
magic. CastsRaiseDead This Component gives the Thang a raise-dead spell.
cooldown:
0.5s
duration:
10s
power:
100
radius:
20m
specificCooldown:
10s
magic. Casts This Component gives the Thang the ability to cast spells (from other Components).
combat. Flaps This Component gives the Thang a flapping wind gust ability.
cooldown:
0.1s
flapRadius:
30m
flapWindMass:
20kg
specificCooldown:
0s
combat. Paralyze Paralyzes the target
cooldown:
0.75s
paralyzeDuration:
4s
paralyzeFactor:
0
paralyzeRange:
25m
specificCooldown:
13s
combat. Pacify Significantly slows the target and reduces the attack damage of the target. Deals small damage proportional to the attacker’s attack damage
cooldown:
0.75s
pacifyDuration:
5s
pacifyFactor:
0.2
pacifyRange:
35m
specificCooldown:
7s
combat. AttacksNearby This Thang has an attackNearbyEnemy method.
attackNearbyEnemyWaitTime:
3
attackNearbyEnemyRange:
0
combat. Attackable This Component gives the Thang health and the ability to take damage.
damageReflection:
0
damageReflectionRange:
5m
health:
0
healthReplenishRate:
5
maxHealth:
3666
combat. Attacks This Thang can attack.
attackDamage:
50
attackMass:
0kg
attackRange:
3m
attackZAngle:
0rad (0˚)
attacksWhenOutOfRange:
false
chasesWhenAttackingOutOfRange:
true
complainsWhenAttackingOutOfRange:
false
cooldown:
1s
specificCooldown:
0s
attackMovesIncrementally:
false
existence. Spawns This Thang can spawn other Thangs.
requiredThangTypes:
(empty)
vision. Sees This Thang can see other Thangs.
seesThroughWalls:
false
visualRange:
9001m
combat. HurtsToTouch This Component makes the Thang hurt any other Thangs that touch it.
touchDamagePerSecond:
50
touchIgnoresStationary:
false
combat. AttacksAtRange
targeting. RotatesToTarget This Thang will rotate to face its target.
targeting. Targets This Thang can target other Thangs or positions.
collision. ProximityTrigger Triggers a method call when approached.
groundOnly:
false
triggerRange:
2
inventory. Equips This Component lets the Thang equip Items. It pulls in all the Components needed for a basic, versatile Thang.
attackDamageFactor:
1
maxHealthFactor:
1
ai. FindsPaths This Component lets the Thang use pathfinding when it moves, and gives it access to the AI System’s pathfinding data structures.
collision. Collides This Thang collides with other Thangs.
collisionType:
“dynamic”
collisionCategory:
“ground”
mass:
70kg
fixedRotation:
false
isBullet:
false
restitution:
0.5
event. HasEvents This Thang tracks events that happen to it on each frame, like ‘take-damage’.
effect. HasEffects This Component makes the Thang susceptible to effects.
action. Acts This Thang can take actions (like ‘move’ and ‘attack’).
resetsToIdle:
false
alliance. Allied This Thang is part of a team.
team:
“humans”
superteam:
“”
significantProperty:
“isAttackable”
ui. Scales This Component allows the Thang to change its visual scale.
scaleFactor:
1
scaleFactorX:
0
scaleFactorY:
0
hearing. Hears This Thang can hear other Thangs.
hearingRange:
9001m
hearingDelayMinimum:
0.5s
hearingDelayMaximum:
2s
ui. Selectable This Thang can be selected by clicking on it.
excludedHUDProperties:
(empty)
extraHUDProperties:
(empty)
inThangList:
true
hudName:
“”
hearing. Says This Thang can talk.
cooldown:
0s
labelStyle:
“say”
silent:
false
voiceRange:
20m
movement. Moves This Thang can move (either by running, rolling, flying, or swimming).
locomotionType:
“running”
maxSpeed:
3.6m/s
maxAcceleration:
100m/s^2
dragCoefficient:
1
rollingResistance:
0.3
currentSpeedRatio:
1
cooldown:
0s
programming. HasAPI This Component lets the Thang specify its API to other Programmable Thangs. You can also use it to add random properties to a Thang.
apiMethods:
“findNearest” | “hasEffect” | “distanceTo” | …
“findNearest”
“hasEffect”
“distanceTo”
“findNearestEnemy”
“findEnemies”
“findByType”
apiProperties:
“id” | “health” | “pos” | …
“id”
“health”
“pos”
“target”
“team”
“type”
“maxHealth”
type:
“”