Both bugs came up while I was trying to copy paste the events from the behavior "Follow Target", to create Follow Target 2 with my own modifications. (I'm still testing this software actually so I have no game to post. I use Easy RPG Creator as a template)
The first bug was that "Target Actor" kept changing into "Screen Diagonal" in the pasted events, presumably because "When created" -- the first event -- had "screen diagonal". I'm attaching a screen shot of the resulting mess of code.
Another bug is that when I delete the events from the behavior, the code still remains when I use the preview code feature, even after saving and importing the behavior.
Here's some of the log:
[LOG] Activated: Follow Target 2*
[LOG] Added: set-val-60-1
[LOG] Added: init
[LOG] Activated: Follow Target
[LOG] Write out actor variable: 1
[LOG] Write out thisActor
[LOG] Write out actor variable: 1
[LOG] Write out thisActor
[LOG] Write out thisActor
[LOG] Write out thisActor
[LOG] Write out thisActor
[LOG] Write out actor variable: 1
[LOG] <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<event displayName="Updated" enabled="true" id="1" name="step" order="2" repeats="true">
<groups>
<group eventID="1" id="0">
<step comment="false" x="15" y="15">
<group eventID="1" id="-1">
<if comment="false" x="26" y="40">
<group eventID="3" id="-1">
<set-val-59-2 comment="false" x="37" y="78">
<minus comment="false" id="0" x="0" y="0">
<get-xy comment="false" id="0" x="0" y="0">
<ACTOR eid="var" id="0" vid="1"/>
<int id="1" val="2"/>
</get-xy>
<get-xy comment="false" id="1" x="0" y="0">
<ACTOR eid="this" id="0"/>
<int id="1" val="2"/>
</get-xy>
</minus>
</set-val-59-2>
<set-val-59-3 comment="false" x="37" y="116">
<minus comment="false" id="0" x="0" y="0">
<get-xy comment="false" id="0" x="0" y="0">
<ACTOR eid="var" id="0" vid="1"/>
<int id="1" val="3"/>
</get-xy>
<get-xy comment="false" id="1" x="0" y="0">
<ACTOR eid="this" id="0"/>
<int id="1" val="3"/>
</get-xy>
</minus>
</set-val-59-3>
<set-val-59-4 comment="false" x="37" y="154">
<sqrt comment="false" id="0" x="0" y="0">
<plus comment="false" id="0" x="0" y="0">
<pow comment="false" id="0" x="0" y="0">
<get-val-59-2 comment="false" id="0" x="0" y="0"/>
<int id="1" val="2"/>
</pow>
<pow comment="false" id="1" x="0" y="0">
<get-val-59-3 comment="false" id="0" x="0" y="0"/>
<int id="1" val="2"/>
</pow>
</plus>
</sqrt>
</set-val-59-4>
<set-val-59-5 comment="false" x="37" y="194">
<to-degreesradians comment="false" id="0" x="0" y="0">
<int id="0" val="0"/>
<atan2 comment="false" id="1" x="0" y="0">
<get-val-59-3 comment="false" id="0" x="0" y="0"/>
<get-val-59-2 comment="false" id="1" x="0" y="0"/>
</atan2>
</to-degreesradians>
</set-val-59-5>
<if comment="false" x="37" y="237">
<group eventID="-1" id="-1">
<if comment="false" x="48" y="277">
<group eventID="1" id="-1">
<setvel comment="false" x="59" y="302">
<ACTOR eid="this" id="0"/>
<get-val-59-5 comment="false" id="1" x="0" y="0"/>
<plus comment="false" id="2" x="0" y="0">
<get-val-59-9 comment="false" id="0" x="0" y="0"/>
<times comment="false" id="1" x="0" y="0">
<get-val-59-6 comment="false" id="0" x="0" y="0"/>
<div comment="false" id="1" x="0" y="0">
<minus comment="false" id="0" x="0" y="0">
<get-val-59-4 comment="false" id="0" x="0" y="0"/>
<get-val-59-7 comment="false" id="1" x="0" y="0"/>
</minus>
<get-val-59-10 comment="false" id="1" x="0" y="0"/>
</div>
</times>
</plus>
</setvel>
</group>
<get-val-59-8 comment="false" id="0" x="0" y="0"/>
</if>
<else comment="false" x="48" y="366">
<group eventID="1" id="-1">
<setvel comment="false" x="59" y="386">
<ACTOR eid="this" id="0"/>
<get-val-59-5 comment="false" id="1" x="0" y="0"/>
<get-val-59-6 comment="false" id="2" x="0" y="0"/>
</setvel>
</group>
</else>
</group>
<and comment="false" id="0" x="0" y="0">
<more comment="false" id="0" x="0" y="0">
<get-val-59-4 comment="false" id="0" x="0" y="0"/>
<get-val-59-7 comment="false" id="1" x="0" y="0"/>
</more>
<not comment="false" id="1" x="0" y="0">
<and comment="false" id="0" x="0" y="0">
<get-val-59-11 comment="false" id="0" x="0" y="0"/>
<get-val-59-12 comment="false" id="1" x="0" y="0"/>
</and>
</not>
</and>
</if>
<else comment="false" x="37" y="442">
<group eventID="-1" id="-1">
<setvel comment="false" x="48" y="462">
<ACTOR eid="this" id="0"/>
<int id="1" val="0"/>
<int id="2" val="0"/>
</setvel>
</group>
</else>
<set-val-59-12 comment="false" x="37" y="501">
<false comment="false" id="0" x="0" y="0"/>
</set-val-59-12>
</group>
<and comment="false" id="0" x="0" y="0">
<value comment="false" id="0" x="0" y="0">
<int id="0" val="1"/>
<int id="1" val="0"/>
</value>
<isalive comment="false" id="1" x="0" y="0">
<ACTOR eid="var" id="0" vid="1"/>
</isalive>
</and>
</if>
</group>
</step>
</group>
<group eventID="1" id="-1"/>
</groups>
<vars>
<actor default="" defaultValue="" desc="The target actor this actor will follow. <br /> If the target actor is unset or dead this behavior will do nothing." dropdown="" fullname="Target Actor" hidden="false" id="1" name="_TargetActor" order="7"/>
<number default="0.0" defaultValue="0.0" desc="" dropdown="" fullname="Distance X" hidden="true" id="2" name="_DistanceX" order="1"/>
<number default="0.0" defaultValue="0.0" desc="" dropdown="" fullname="Distance Y" hidden="true" id="3" name="_DistanceY" order="2"/>
<number default="0.0" defaultValue="0.0" desc="" dropdown="" fullname="Distance" hidden="true" id="4" name="_Distance" order="3"/>
<number default="0.0" defaultValue="0.0" desc="" dropdown="" fullname="Direction" hidden="true" id="5" name="_Direction" order="4"/>
<number default="30.0" defaultValue="30.0" desc="The speed to move towards the target." dropdown="" fullname="Speed" hidden="false" id="6" name="_Speed" order="8"/>
<number default="0.0" defaultValue="0.0" desc="The actor will not move closer to the target than this value." dropdown="" fullname="Margin" hidden="false" id="7" name="_Margin" order="9"/>
<boolean default="true" defaultValue="true" desc="If selected, the actor will move faster if farther away from the target and slower if closer to to the target.<br /> If unselected, the actor will move towards the target at a constant speed as specified in the <var>Speed</var> attribute." dropdown="" fullname="Easing" hidden="false" id="8" name="_Easing" order="11"/>
<number default="5.0" defaultValue="5.0" desc="Only used when <var>Easing</var> is selected.<br /> The actor will move at least at this speed. The actual speed depends on the distance to the target. The maximum speed is <var>Minimum Easing Speed</var> plus <var>Speed</var>. The actor will move at maximum speed if it is in the opposite diagonal corner of the target." dropdown="" fullname="Minimum Easing Speed" hidden="false" id="9" name="_MinimumEasingSpeed" order="12"/>
<number default="0.0" defaultValue="0.0" desc="" dropdown="" fullname="Screen Diagonal" hidden="true" id="10" name="_ScreenDiagonal" order="5"/>
<boolean default="true" defaultValue="true" desc="If selected, the actor will stop moving when colliding with the target actor.<br /> If unselected, the actor will instead continue to and push the target around." dropdown="" fullname="Stop when Colliding" hidden="false" id="11" name="_StopwhenColliding" order="10"/>
<boolean default="false" defaultValue="false" desc="" dropdown="" fullname="Collided" hidden="true" id="12" name="_Collided" order="6"/>
<actor default="thisactor" defaultValue="thisactor" desc="" dropdown="" fullname="Actor" hidden="true" id="2147483647" name="actor" order="0"/>
</vars>
</event>
[LOG] Activated: Follow Target 2*
[ERR] Warning: This kind of block does not exist: ACTOR
[LOG] Reading element ID: var
[LOG] Reading variable ID: 1
[LOG] variable text toDisplay: Screen Diagonal
[ERR] Warning: This kind of block does not exist: ACTOR
[LOG] Reading element ID: this
[LOG] Select this Actor
[LOG] DEFAULT ACTION
[LOG] Set Index to: 3
[LOG] Added: set-val-60-2
[ERR] Warning: This kind of block does not exist: ACTOR
[LOG] Reading element ID: var
[LOG] Reading variable ID: 1
[LOG] variable text toDisplay: Screen Diagonal
[ERR] Warning: This kind of block does not exist: ACTOR
[LOG] Reading element ID: this
[LOG] Select this Actor
[LOG] DEFAULT ACTION
[LOG] Set Index to: 3
[LOG] Added: set-val-60-3
[LOG] Added: set-val-60-4
[LOG] Added: set-val-60-5
[ERR] Warning: This kind of block does not exist: ACTOR
[LOG] Reading element ID: this
[LOG] Select this Actor
[LOG] DEFAULT ACTION
[LOG] Set Index to: 3
[LOG] Added: setvel
[LOG] Added: if
[ERR] Warning: This kind of block does not exist: ACTOR
[LOG] Reading element ID: this
[LOG] Select this Actor
[LOG] DEFAULT ACTION
[LOG] Set Index to: 3
[LOG] Added: setvel
[LOG] Added: else
[LOG] Added: if
[ERR] Warning: This kind of block does not exist: ACTOR
[LOG] Reading element ID: this
[LOG] Select this Actor
[LOG] DEFAULT ACTION
[LOG] Set Index to: 3
[LOG] Added: setvel
[LOG] Added: else
[LOG] Added: set-val-60-11
[ERR] Warning: This kind of block does not exist: ACTOR
[LOG] Reading element ID: var
[LOG] Reading variable ID: 1
[LOG] variable text toDisplay: Screen Diagonal
[LOG] Added: if
[LOG] Added: step
[LOG] Activated: Follow Target
[ERR] Warning: This kind of block does not exist: ACTOR
[LOG] Reading element ID: var
[LOG] Reading variable ID: 1
[LOG] variable text toDisplay: Target Actor
[ERR] Warning: This kind of block does not exist: ACTOR
[LOG] Reading element ID: this
[LOG] Select this Actor
[LOG] DEFAULT ACTION
[LOG] Set Index to: 3
[LOG] Added: set-val-59-2
[ERR] Warning: This kind of block does not exist: ACTOR
[LOG] Reading element ID: var
[LOG] Reading variable ID: 1
[LOG] variable text toDisplay: Target Actor
[ERR] Warning: This kind of block does not exist: ACTOR
[LOG] Reading element ID: this
[LOG] Select this Actor
[LOG] DEFAULT ACTION
[LOG] Set Index to: 3
[LOG] Added: set-val-59-3
[LOG] Added: set-val-59-4
[LOG] Added: set-val-59-5
[ERR] Warning: This kind of block does not exist: ACTOR
[LOG] Reading element ID: this
[LOG] Select this Actor
[LOG] DEFAULT ACTION
[LOG] Set Index to: 3
[LOG] Added: setvel
[LOG] Added: if
[ERR] Warning: This kind of block does not exist: ACTOR
[LOG] Reading element ID: this
[LOG] Select this Actor
[LOG] DEFAULT ACTION
[LOG] Set Index to: 3
[LOG] Added: setvel
[LOG] Added: else
[LOG] Added: if
[ERR] Warning: This kind of block does not exist: ACTOR
[LOG] Reading element ID: this
[LOG] Select this Actor
[LOG] DEFAULT ACTION
[LOG] Set Index to: 3
[LOG] Added: setvel
[LOG] Added: else
[LOG] Added: set-val-59-12
[ERR] Warning: This kind of block does not exist: ACTOR
[LOG] Reading element ID: var
[LOG] Reading variable ID: 1
[LOG] variable text toDisplay: Target Actor
[LOG] Added: if
[LOG] Added: step
[LOG] Activated: Follow Target 2*
[ERR] Warning: This kind of block does not exist: ACTOR
[LOG] Reading element ID: var
[LOG] Reading variable ID: 1
[LOG] variable text toDisplay: Screen Diagonal
[ERR] Warning: This kind of block does not exist: ACTOR
[LOG] Reading element ID: this
[LOG] Select this Actor
[LOG] DEFAULT ACTION
[LOG] Set Index to: 3
[LOG] Added: set-val-60-2
[ERR] Warning: This kind of block does not exist: ACTOR
[LOG] Reading element ID: var
[LOG] Reading variable ID: 1
[LOG] variable text toDisplay: Screen Diagonal
[ERR] Warning: This kind of block does not exist: ACTOR
[LOG] Reading element ID: this
[LOG] Select this Actor
[LOG] DEFAULT ACTION
[LOG] Set Index to: 3
[LOG] Added: set-val-60-3
[LOG] Added: set-val-60-4
[LOG] Added: set-val-60-5
[ERR] Warning: This kind of block does not exist: ACTOR
[LOG] Reading element ID: this
[LOG] Select this Actor
[LOG] DEFAULT ACTION
[LOG] Set Index to: 3
[LOG] Added: setvel
[LOG] Added: if
[ERR] Warning: This kind of block does not exist: ACTOR
[LOG] Reading element ID: this
[LOG] Select this Actor
[LOG] DEFAULT ACTION
[LOG] Set Index to: 3
[LOG] Added: setvel
[LOG] Added: else
[LOG] Added: if
[ERR] Warning: This kind of block does not exist: ACTOR
[LOG] Reading element ID: this
[LOG] Select this Actor
[LOG] DEFAULT ACTION
[LOG] Set Index to: 3
[LOG] Added: setvel
[LOG] Added: else
[LOG] Added: set-val-60-11
[ERR] Warning: This kind of block does not exist: ACTOR
[LOG] Reading element ID: var
[LOG] Reading variable ID: 1
[LOG] variable text toDisplay: Screen Diagonal
[LOG] Added: if
[LOG] Added: step
[LOG] Activated: Follow Target*
[LOG] Activated: Follow Target 2*
[LOG] Activated: Follow Target*
[LOG] Activated: Follow Target 2*
[LOG] Activated: Follow Target*
[LOG] Activated: Follow Target 2*
[LOG] Activated: Follow Target*
[LOG] Activated: Follow Target 2*
[ERR] Classname to Generate: Design_61_61_FollowTarget2
[LOG] Activated: Follow Target*
[LOG] Activated: Follow Target 2*
[LOG] Reading header for Scene: 0 ()
[LOG] From: scenes\0.xml
[LOG] Save in place.