LuaAPI.wiki
changeset 71 2dcbebb06088
parent 70 ff7d4c176303
child 72 6bfadfa16443
equal deleted inserted replaced
70:ff7d4c176303 71:2dcbebb06088
   160 </blockquote>
   160 </blockquote>
   161 === <tt>!GetGearPosition(gearUid)</tt> ===
   161 === <tt>!GetGearPosition(gearUid)</tt> ===
   162 
   162 
   163 <blockquote>returns tuple of x,y coordinates for the specified gear
   163 <blockquote>returns tuple of x,y coordinates for the specified gear
   164 </blockquote>
   164 </blockquote>
       
   165 === <tt>!GetGearVelocity(gearUid)</tt> (dev) ===
       
   166 
       
   167 <blockquote>returns tuple of dx,dy values for the specified gear
       
   168 </blockquote>
   165 === <tt>!GetHogClan(gearUid)</tt> ===
   169 === <tt>!GetHogClan(gearUid)</tt> ===
   166 
   170 
   167 <blockquote>returns the clan id of the specified hedgehog gear
   171 <blockquote>returns the clan id of the specified hedgehog gear
   168 </blockquote>
   172 </blockquote>
   169 === <tt>!GetHogTeamName(gearUid)</tt> ===
   173 === <tt>!GetHogTeamName(gearUid)</tt> ===
   272 <code lang="lua">    !HogTurnLeft(!CurrentHedgehog, true) -- turns !CurrentHedgehog left 
   276 <code lang="lua">    !HogTurnLeft(!CurrentHedgehog, true) -- turns !CurrentHedgehog left 
   273     !HogTurnLeft(!CurrentHedgehog, false) -- turns !CurrentHedgehog right</code>
   277     !HogTurnLeft(!CurrentHedgehog, false) -- turns !CurrentHedgehog right</code>
   274 === <tt>!SetGearPosition(gearUid, x, y)</tt> ===
   278 === <tt>!SetGearPosition(gearUid, x, y)</tt> ===
   275 
   279 
   276 <blockquote>Places the specified gear exactly at the position (x,y).
   280 <blockquote>Places the specified gear exactly at the position (x,y).
       
   281 </blockquote>
       
   282 === <tt>!SetGearVelocity(gearUid, dx, dy)</tt> ===
       
   283 
       
   284 <blockquote>Gives the specified gear the velocity of dx, dy.
   277 </blockquote>
   285 </blockquote>
   278 === <tt>!SetAmmo(ammoType, count, probability, delay, numberInCrate)</tt> ===
   286 === <tt>!SetAmmo(ammoType, count, probability, delay, numberInCrate)</tt> ===
   279 
   287 
   280 <blockquote>This updates the settings for a specified [AmmoTypes Ammo Type] as of count available for players, spawn probability, availability delay in turns, and the number available in crates. This is supposed to be used in the onAmmoStoreInit() even handler.
   288 <blockquote>This updates the settings for a specified [AmmoTypes Ammo Type] as of count available for players, spawn probability, availability delay in turns, and the number available in crates. This is supposed to be used in the onAmmoStoreInit() even handler.
   281 </blockquote>
   289 </blockquote>
   301 Notice: In 0.9.14 this function takes 0 or 1 instead of true/false.
   309 Notice: In 0.9.14 this function takes 0 or 1 instead of true/false.
   302 === <tt>CopyPV(gearUid, gearUid)</tt> ===
   310 === <tt>CopyPV(gearUid, gearUid)</tt> ===
   303 
   311 
   304 <blockquote>This sets the position and velocity of the second gear to the first one.
   312 <blockquote>This sets the position and velocity of the second gear to the first one.
   305 </blockquote>
   313 </blockquote>
   306 === <tt>CopyPV2(gearUid, gearUid)</tt> ===
   314 === <tt>CopyPV2(gearUid, gearUid)</tt> (deprecated) ===
   307 
   315 
   308 <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.
   316 <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.
   309 </blockquote>
   317 </blockquote>
       
   318 Notice: This is removed in dev, use GetGearVelocity and SetGearVelocity instead.
   310 === <tt>!FollowGear(gearUid)</tt> ===
   319 === <tt>!FollowGear(gearUid)</tt> ===
   311 
   320 
   312 <blockquote>Makes the gameclient follow the specifiec gear.
   321 <blockquote>Makes the gameclient follow the specifiec gear.
   313 </blockquote>
   322 </blockquote>
   314 === <tt>!SetState(gearUid, state)</tt> ===
   323 === <tt>!SetState(gearUid, state)</tt> ===