182 !SpawnUtilityCrate(0, 0, amLaserSight)</code> |
182 !SpawnUtilityCrate(0, 0, amLaserSight)</code> |
183 === <tt>!AddTeam(teamname, color, grave, fort, voicepack, flag)</tt> === |
183 === <tt>!AddTeam(teamname, color, grave, fort, voicepack, flag)</tt> === |
184 |
184 |
185 <blockquote>Adds a new team. Note that this can only be done in onGameInit(), not at a later time. First argument is the team name followed by color, grave, fort, voicepack and flag settings. |
185 <blockquote>Adds a new team. Note that this can only be done in onGameInit(), not at a later time. First argument is the team name followed by color, grave, fort, voicepack and flag settings. |
186 </blockquote> |
186 </blockquote> |
187 Notice: This works only for singleplayers training missions for now and will desync multiplayer games. Flag setting is dev only. |
187 Notice: This works only for singleplayer's training missions for now and will desync multiplayer games. Flag setting is dev only. |
188 |
188 |
189 Example: |
189 Example: |
190 |
190 |
191 <code lang="lua"> !AddTeam("team 1", 14483456, "Simple", "Island", "Default", "hedgewars")</code> |
191 <code lang="lua"> !AddTeam("team 1", 14483456, "Simple", "Island", "Default", "hedgewars")</code> |
192 === <tt>!AddHog(hogname, botlevel, health, hat)</tt> === |
192 === <tt>!AddHog(hogname, botlevel, health, hat)</tt> === |
378 end</code> |
378 end</code> |
379 |
379 |
380 |
380 |
381 |
381 |
382 </blockquote> |
382 </blockquote> |
383 === <tt>!SetEffect(gearUid, effect, true/false)</tt> (0.9.14 / dev) === |
383 === <tt>!SetEffect(gearUid, effect, true/false)</tt> === |
384 |
384 |
385 <blockquote>Enables (true) or disables (false) one of the effects <tt>heInvulnerable, heResurrectable, hePoisoned</tt> for the specified hedgehog gear. |
385 <blockquote>Enables (true) or disables (false) one of the effects <tt>heInvulnerable, heResurrectable, hePoisoned</tt> for the specified hedgehog gear. |
386 </blockquote> |
386 </blockquote> |
387 Example: (sets all bots poisoned) |
387 Example: (sets all bots poisoned) |
388 |
388 |
398 </blockquote> |
398 </blockquote> |
399 === <tt>CopyPV2(gearUid, gearUid)</tt> (deprecated) === |
399 === <tt>CopyPV2(gearUid, gearUid)</tt> (deprecated) === |
400 |
400 |
401 <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. |
401 <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. |
402 </blockquote> |
402 </blockquote> |
403 Notice: This is removed in dev, use GetGearVelocity and SetGearVelocity instead. |
403 Notice: This function is no longer used, use GetGearVelocity and SetGearVelocity instead. |
404 === <tt>!FollowGear(gearUid)</tt> === |
404 === <tt>!FollowGear(gearUid)</tt> === |
405 |
405 |
406 <blockquote>Makes the gameclient follow the specifiec gear. |
406 <blockquote>Makes the gameclient follow the specifiec gear. |
407 </blockquote> |
407 </blockquote> |
408 === <tt>!SetState(gearUid, state)</tt> === |
408 === <tt>!SetState(gearUid, state)</tt> === |
423 === <tt>!SetTimer(gearUid, timer)</tt> (0.9.14) === |
423 === <tt>!SetTimer(gearUid, timer)</tt> (0.9.14) === |
424 |
424 |
425 <blockquote>Sets the timer of the specified gear. Also see !GetTimer. |
425 <blockquote>Sets the timer of the specified gear. Also see !GetTimer. |
426 </blockquote> |
426 </blockquote> |
427 |
427 |
428 === <tt>!SetBotLevel(gearUid)</tt> (dev) === |
428 === <tt>!SetBotLevel(gearUid)</tt> (0.9.16) === |
429 |
429 |
430 <blockquote>Sets the bot level from 0 to 5. 0 means human player. |
430 <blockquote>Sets the bot level from 0 to 5. 0 means human player. |
431 </blockquote> |
431 </blockquote> |
432 |
432 |
433 == Other Functions == |
433 == Other Functions == |
505 === <tt>!SetWind(windSpeed)</tt> (0.9.15) === |
505 === <tt>!SetWind(windSpeed)</tt> (0.9.15) === |
506 |
506 |
507 <blockquote>Sets the current wind in the range of -100 to 100. Use together with gfDisableWind for full control. |
507 <blockquote>Sets the current wind in the range of -100 to 100. Use together with gfDisableWind for full control. |
508 </blockquote> |
508 </blockquote> |
509 |
509 |
510 === <tt>!GetDataPath()</tt> (dev) === |
510 === <tt>!GetDataPath()</tt> (0.9.15) === |
511 |
511 |
512 <blockquote>Returns the path to the data directory, used when adding libraries. |
512 <blockquote>Returns the path to the data directory, used when adding libraries. |
513 </blockquote> |
513 </blockquote> |
514 |
514 |
515 === <tt>!GetClanColor(clan)</tt> (0.9.15) === |
515 === <tt>!GetClanColor(clan)</tt> (0.9.15) === |
516 |
516 |
517 <blockquote>Returns the colour of the chosen clan by its number. |
517 <blockquote>Returns the colour of the chosen clan by its number. |
518 </blockquote> |
518 </blockquote> |
519 |
519 |
520 === <tt>!PlaceGirder(x, y, state)</tt> (dev) === |
520 === <tt>!PlaceGirder(x, y, state)</tt> (0.9.16) === |
521 |
521 |
522 <blockquote>Places a girder with centre points x, y and the chosen state. |
522 <blockquote>Places a girder with centre points x, y and the chosen state. |
523 These are the accepted states: |
523 These are the accepted states: |
524 * 0: short, vertical |
524 * 0: short, vertical |
525 * 1: short, decreasing |
525 * 1: short, decreasing |
529 * 5: long, decreasing |
529 * 5: long, decreasing |
530 * 6: long, horizontal |
530 * 6: long, horizontal |
531 * 7: long, increasing |
531 * 7: long, increasing |
532 </blockquote> |
532 </blockquote> |
533 |
533 |
534 === <tt>!GetCurAmmoType()</tt> (dev) === |
534 === <tt>!GetCurAmmoType()</tt> (0.9.16) === |
535 |
535 |
536 <blockquote>Returns the currently selected [AmmoTypes Ammo Type]. |
536 <blockquote>Returns the currently selected [AmmoTypes Ammo Type]. |
537 </blockquote> |
537 </blockquote> |
538 |
538 |
539 == Debugging Functions == |
539 == Debugging Functions == |