summon_weapon

A singular summoned object
How summon weapons work:
Reset() - makes it go back to its master. Target() - locks onto a target for a duration
The biggest challenge is synchronizing animations. Variables keep track of when things tick, but, animations are client-timed, and not server-timed
Animations: The weapon can only track its "intended" angle and dist "Current" pixel x/y are always calculated relative to a target from the current orbiting atom the physical effect is on There's 3 animations, MoveTo(location, angle, dist, rotation) Orbit(location) Rotate(degrees)
And an non-animation that just snaps it to a location, HardReset(location)
Vars | |
| angle | current angle from victim - clockwise from 0. null if not attacking. |
|---|---|
| angle_vary | rand dist to rotate during reattack phase |
| animation_lock | animation locked until |
| animation_timerid | animation lock timer |
| appearance | mutable_appearance to use, will skip making from icon/icon state if so |
| atom | the actual effect |
| attack_damage | attack damage |
| attack_length | attack length in deciseconds - this is the attack animation speed in total |
| attack_sound | attack sound |
| attack_speed | attack delay in deciseconds - this is time spent between attacks |
| attack_type | attack damtype |
| attack_verb | attack verb |
| dist | current distance from victim - pixels |
| host | host |
| icon | icon file |
| icon_state | icon state |
| name | name |
| orbit_dist | orbit distance from victim - pixels |
| orbit_dist_vary | orbit distance variation from victim |
| reset_speed | reset animation duration |
| reset_timerid | reset timerid |
| rotation | current rotation - angles clockwise from north |
| state | current state |
| victim | currently locked attack target |
Procs | |
| MoveTo | relative to defaults to current location |
| Rotate | rotation defaults to facing towards locked atom |
Var Details
angle

current angle from victim - clockwise from 0. null if not attacking.
angle_vary

rand dist to rotate during reattack phase
animation_lock

animation locked until
animation_timerid

animation lock timer
appearance

mutable_appearance to use, will skip making from icon/icon state if so
atom

the actual effect
attack_damage

attack damage
attack_length

attack length in deciseconds - this is the attack animation speed in total
attack_sound

attack sound
attack_speed

attack delay in deciseconds - this is time spent between attacks
attack_type

attack damtype
attack_verb

attack verb
dist

current distance from victim - pixels
host

host
icon

icon file
icon_state

icon state
name

name
orbit_dist

orbit distance from victim - pixels
orbit_dist_vary

orbit distance variation from victim
reset_speed

reset animation duration
reset_timerid

reset timerid
rotation

current rotation - angles clockwise from north
state

current state
victim

currently locked attack target
Proc Details
MoveTo
relative to defaults to current location
Rotate
rotation defaults to facing towards locked atom