LuaAPI.wiki
changeset 17 2893bd461cc7
parent 16 89f22a959bb8
child 21 e8bcd7c1ba3c
equal deleted inserted replaced
16:89f22a959bb8 17:2893bd461cc7
   188 <code lang="lua">    function onGearAdd(gear)
   188 <code lang="lua">    function onGearAdd(gear)
   189         if (!GetGearType(gear) === gtHedgehog) and (!GetBotLevel(gear) > 0) then
   189         if (!GetGearType(gear) === gtHedgehog) and (!GetBotLevel(gear) > 0) then
   190             !SetEffect(gear, hePoisoned, true)
   190             !SetEffect(gear, hePoisoned, true)
   191         end
   191         end
   192     end</code>
   192     end</code>
   193 === <tt>!CopyPV(gearUid, gearUid)</tt> ===
   193 === <tt>CopyPV(gearUid, gearUid)</tt> ===
   194 
   194 
   195 <blockquote>This sets the position and velocity of the second gear to the first one.
   195 <blockquote>This sets the position and velocity of the second gear to the first one.
   196 </blockquote>
   196 </blockquote>
   197 === <tt>!CopyPV2(gearUid, gearUid)</tt> ===
   197 === <tt>CopyPV2(gearUid, gearUid)</tt> ===
   198 
   198 
   199 <blockquote>This sets the position of the second gear to that of the first one, but makes its velocity twice the one of the first.
   199 <blockquote>This sets the position of the second gear to that of the first one, but makes its velocity twice the one of the first.
   200 </blockquote>
   200 </blockquote>
   201 === <tt>!FollowGear(gearUid)</tt> ===
   201 === <tt>!FollowGear(gearUid)</tt> ===
   202 
   202