34 Example: |
34 Example: |
35 |
35 |
36 <code language="lua"> -- adds an non-critical explosion at position 1000,1000. Returns 0 if it was not created. |
36 <code language="lua"> -- adds an non-critical explosion at position 1000,1000. Returns 0 if it was not created. |
37 local vgear = AddVisualGear(1000, 1000, vgtExplosion, 0, false) |
37 local vgear = AddVisualGear(1000, 1000, vgtExplosion, 0, false) |
38 </code> |
38 </code> |
39 |
|
40 === <tt>!SpawnHealthCrate(x, y, [, health])</tt> === |
|
41 Spawns a health crate at the specified position. If `x` and `y` are set to 0, the crate will spawn on a random position (but always on land). Set `health` for the initial health contained in the health crate. If not set, the default health (`HealthCaseAmount`) is used. Do not use a negative value for `health`. |
|
42 |
|
43 === <tt>!SpawnSupplyCrate(x, y, ammoType [, amount])</tt> (0.9.24) === |
|
44 Spawns an ammo or utility crate at the specified position with the given ammo type and an optional amount (default: 1). The crate type is chosen automatically based on the ammo type. |
|
45 Otherwise, this function behaves like `SpawnAmmoCrate`. |
|
46 |
|
47 === <tt>!SpawnAmmoCrate(x, y, ammoType [, amount])</tt> === |
|
48 Spawns an ammo crate at the specified position with content of `ammoType` (see [AmmoTypes Ammo Types]). Any `ammoType` is permitted, an ammo crate is spawned even if the ammo is normally defined as an utility. |
|
49 If `ammoType` is set to `amNothing`, a random weapon (out of the available weapons from the weapon scheme) will be selected. If `x` and `y` are set to 0, the crate will spawn on a random position (but always on land). The `amount` parameter specifies the amount of ammo contained in the crate. If `amount` is `nil` or `0`, the value set by `SetAmmo` is used, or if `SetAmmo` has not been used, it falls back to the weapon scheme's value. If `amount` is equal to or greater than `AMMO_INFINITE`, the amount is infinite. |
|
50 |
|
51 Note that in Lua missions, the default number of ammo in crates is 0, so it has to be set to at least 1 with `SetAmmo` first, see the example: |
|
52 |
|
53 Example: |
|
54 |
|
55 <code language="lua"> SetAmmo(amGrenade, 0, 0, 0, 1) -- grenade ammo crates now contain 1 grenade each |
|
56 SpawnAmmoCrate(0, 0, amGrenade) -- spawn grenade ammo crate at random position</code> |
|
57 |
|
58 === <tt>!SpawnUtilityCrate(x, y, ammoType [, amount])</tt> === |
|
59 Spawns an utility crate with some ammo at the specified position. The function behaves almost like `SpawnAmmoCrate`, the differences are 1) the crate looks different and 2) if `ammoType` is set to `amNothing`, a random utility out of the set of available utilities from the weapon scheme is chosen as content. |
|
60 |
|
61 Example: |
|
62 |
|
63 <code language="lua"> SetAmmo(amLaserSight, 0, 0, 0, 1) |
|
64 SpawnUtilityCrate(0, 0, amLaserSight)</code> |
|
65 |
|
66 === <tt>!SpawnFakeAmmoCrate(x, y, explode, poison) </tt> === |
|
67 Spawns a crate at the specified coordinates which looks exactly like a real ammo crate but contains not any ammo. It can be use useful for scripted events or to create a trap. If `x` and `y` are set to 0, the crate will spawn on a random position (but always on land). |
|
68 `explode` and `poison` are booleans. |
|
69 If `explode` is `true`, the crate will explode when collected. |
|
70 If `poison` is `true`, the collector will be poisoned. |
|
71 |
|
72 Example: |
|
73 |
|
74 <code language="lua">SpawnFakeAmmoCrate(500, 432, false, false) -- Spawns a fake ammo crate at the coordinates (500, 434) without explosion and poison. |
|
75 </code> |
|
76 |
|
77 === <tt>!SpawnFakeHealthCrate(x, y, explode, poison) </tt> === |
|
78 Same as `SpawnFakeAmmoCrate`, except the crate will look like a health crate. |
|
79 |
|
80 === <tt>!SpawnFakeUtilityCrate(x, y, explode, poison) </tt> === |
|
81 Same as `SpawnFakeAmmoCrate`, except the crate will look like an utility crate. |
|
82 |
39 |
83 === <tt>!AddHog(hogname, botlevel, health, hat)</tt> === |
40 === <tt>!AddHog(hogname, botlevel, health, hat)</tt> === |
84 Adds a new hedgehog for current team (last created one with the `AddTeam` function), with a bot level, an initial health and a hat. |
41 Adds a new hedgehog for current team (last created one with the `AddTeam` function), with a bot level, an initial health and a hat. |
85 |
42 |
86 `botlevel` ranges from `0` to `5`, where `0` denotes a human player and `1` to `5` denote the skill level of a bot, where `1` is strongest and `5` is the weakest. Note that this is the reverse order of how the bot level is displayed in the game. Note that mixing human-controlled and computer-controlled hedgehogs in the same team is not permitted, but it is permitted to use different computer difficulty levels in the same team. |
43 `botlevel` ranges from `0` to `5`, where `0` denotes a human player and `1` to `5` denote the skill level of a bot, where `1` is strongest and `5` is the weakest. Note that this is the reverse order of how the bot level is displayed in the game. Note that mixing human-controlled and computer-controlled hedgehogs in the same team is not permitted, but it is permitted to use different computer difficulty levels in the same team. |
113 AddMissionHog(100) |
70 AddMissionHog(100) |
114 AddMissionHog(100) |
71 AddMissionHog(100) |
115 AddHog("My Hardcoded Hog", 0, 100, "NoHat") |
72 AddHog("My Hardcoded Hog", 0, 100, "NoHat") |
116 </code> |
73 </code> |
117 |
74 |
|
75 === <tt>!SpawnHealthCrate(x, y, [, health])</tt> === |
|
76 Spawns a health crate at the specified position. If `x` and `y` are set to 0, the crate will spawn on a random position (but always on land). Set `health` for the initial health contained in the health crate. If not set, the default health (`HealthCaseAmount`) is used. Do not use a negative value for `health`. |
|
77 |
|
78 === <tt>!SpawnSupplyCrate(x, y, ammoType [, amount])</tt> (0.9.24) === |
|
79 Spawns an ammo or utility crate at the specified position with the given ammo type and an optional amount (default: 1). The crate type is chosen automatically based on the ammo type. |
|
80 Otherwise, this function behaves like `SpawnAmmoCrate`. |
|
81 |
|
82 === <tt>!SpawnAmmoCrate(x, y, ammoType [, amount])</tt> === |
|
83 Spawns an ammo crate at the specified position with content of `ammoType` (see [AmmoTypes Ammo Types]). Any `ammoType` is permitted, an ammo crate is spawned even if the ammo is normally defined as an utility. |
|
84 If `ammoType` is set to `amNothing`, a random weapon (out of the available weapons from the weapon scheme) will be selected. If `x` and `y` are set to 0, the crate will spawn on a random position (but always on land). The `amount` parameter specifies the amount of ammo contained in the crate. If `amount` is `nil` or `0`, the value set by `SetAmmo` is used, or if `SetAmmo` has not been used, it falls back to the weapon scheme's value. If `amount` is equal to or greater than `AMMO_INFINITE`, the amount is infinite. |
|
85 |
|
86 Note that in Lua missions, the default number of ammo in crates is 0, so it has to be set to at least 1 with `SetAmmo` first, see the example: |
|
87 |
|
88 Example: |
|
89 |
|
90 <code language="lua"> SetAmmo(amGrenade, 0, 0, 0, 1) -- grenade ammo crates now contain 1 grenade each |
|
91 SpawnAmmoCrate(0, 0, amGrenade) -- spawn grenade ammo crate at random position</code> |
|
92 |
|
93 === <tt>!SpawnUtilityCrate(x, y, ammoType [, amount])</tt> === |
|
94 Spawns an utility crate with some ammo at the specified position. The function behaves almost like `SpawnAmmoCrate`, the differences are 1) the crate looks different and 2) if `ammoType` is set to `amNothing`, a random utility out of the set of available utilities from the weapon scheme is chosen as content. |
|
95 |
|
96 Example: |
|
97 |
|
98 <code language="lua"> SetAmmo(amLaserSight, 0, 0, 0, 1) |
|
99 SpawnUtilityCrate(0, 0, amLaserSight)</code> |
|
100 |
|
101 === <tt>!SpawnFakeAmmoCrate(x, y, explode, poison) </tt> === |
|
102 Spawns a crate at the specified coordinates which looks exactly like a real ammo crate but contains not any ammo. It can be use useful for scripted events or to create a trap. If `x` and `y` are set to 0, the crate will spawn on a random position (but always on land). |
|
103 `explode` and `poison` are booleans. |
|
104 If `explode` is `true`, the crate will explode when collected. |
|
105 If `poison` is `true`, the collector will be poisoned. |
|
106 |
|
107 Example: |
|
108 |
|
109 <code language="lua">SpawnFakeAmmoCrate(500, 432, false, false) -- Spawns a fake ammo crate at the coordinates (500, 434) without explosion and poison. |
|
110 </code> |
|
111 |
|
112 === <tt>!SpawnFakeHealthCrate(x, y, explode, poison) </tt> === |
|
113 Same as `SpawnFakeAmmoCrate`, except the crate will look like a health crate. |
|
114 |
|
115 === <tt>!SpawnFakeUtilityCrate(x, y, explode, poison) </tt> === |
|
116 Same as `SpawnFakeAmmoCrate`, except the crate will look like an utility crate. |
|
117 |
118 == Functions to get gear properties == |
118 == Functions to get gear properties == |
119 |
119 |
120 === <tt>!GetGearType(gearUid)</tt> === |
120 === <tt>!GetGearType(gearUid)</tt> === |
121 This function returns the [GearTypes gear type] for the specified gear, if it exists. If it doesn't exist, `nil` is returned. |
121 This function returns the [GearTypes gear type] for the specified gear, if it exists. If it doesn't exist, `nil` is returned. |
122 |
122 |
308 |
308 |
309 <code language="lua">-- Return visual gear values |
309 <code language="lua">-- Return visual gear values |
310 local X, Y, dX, dY, Angle, Frame, FrameTicks, State, Timer, Tint, Scale = GetVisualGearValues(vgUid) |
310 local X, Y, dX, dY, Angle, Frame, FrameTicks, State, Timer, Tint, Scale = GetVisualGearValues(vgUid) |
311 </code> |
311 </code> |
312 |
312 |
|
313 == Functions to change position and velocity == |
|
314 === <tt>!SetGearPosition(gearUid, x, y)</tt> === |
|
315 Places the specified gear exactly at the position (`x`,`y`). Not to be confused with `SetGearPos`. |
|
316 |
|
317 === <tt>!SetGearVelocity(gearUid, dx, dy)</tt> === |
|
318 Gives the specified gear the velocity of `dx`, `dy`. |
|
319 |
|
320 === <tt>CopyPV(gearUid, gearUid)</tt> === |
|
321 This sets the position and velocity of the second gear to the first one. |
|
322 |
|
323 === <tt>!FindPlace(gearUid, fall, left, right[, tryHarder])</tt> === |
|
324 Finds a place for the specified gear between x=`left` and x=`right` and places it there. `tryHarder` is optional, setting it to `true`/`false` will determine whether the engine attempts to make additional passes, even attempting to place gears on top of each other. |
|
325 |
|
326 Example: |
|
327 |
|
328 <code language="lua"> gear = AddGear(...) |
|
329 FindPlace(gear, true, 0, LAND_WIDTH) -- places the gear randomly between 0 and LAND_WIDTH</code> |
|
330 |
313 == Functions to modify gears == |
331 == Functions to modify gears == |
314 |
|
315 === <tt>!HideHog(gearUid)</tt> === |
|
316 Removes a hedgehog from the map. The hidden hedgehog can be restored with `RestoreHog(gearUid)`. Since 0.9.23, returns `true` on success and `false` on failure (if gear does not exist / hog is already hidden). |
|
317 |
|
318 Example: |
|
319 |
|
320 <code language="lua"> gear = AddGear(...) |
|
321 HideHog(gear) -- Hide the newly created gear.</code> |
|
322 |
|
323 === <tt>!RestoreHog(gearUid)</tt> === |
|
324 Restores a previously hidden hedgehog. Nothing happens if the hedgehog does not exist or is not hidden. |
|
325 |
|
326 Example: |
|
327 |
|
328 <code language="lua"> gear = AddGear(...) |
|
329 HideHog(gear) -- Hide the newly created gear. |
|
330 RestoreHog(gear) -- Restore the newly hidden gear.</code> |
|
331 |
|
332 === <tt>!SetGearValues(gearUid, Angle, Power, WDTimer, Radius, Density, Karma, DirAngle, AdvBounce, ImpactSound, ImpactSounds, Tint, Damage, Boom)</tt> === |
332 === <tt>!SetGearValues(gearUid, Angle, Power, WDTimer, Radius, Density, Karma, DirAngle, AdvBounce, ImpactSound, ImpactSounds, Tint, Damage, Boom)</tt> === |
333 Sets various gear value for the specified gear (`gearUid`). The meaining of each value often depends on the gear type. See the documentation on !GetGearValues for a brief description of the gear values. If `gearUid` is invalid or the gear does not exist, nothing happens. |
333 Sets various gear value for the specified gear (`gearUid`). The meaining of each value often depends on the gear type. See the documentation on !GetGearValues for a brief description of the gear values. If `gearUid` is invalid or the gear does not exist, nothing happens. |
334 |
334 |
335 Set `nil` for each value you do not want to change. |
335 Set `nil` for each value you do not want to change. |
336 |
336 |
377 <code language="lua"> -- set a visual gear to position 1000,1000 |
377 <code language="lua"> -- set a visual gear to position 1000,1000 |
378 SetVisualGearValues(circleUid, 1000, 1000)</code> |
378 SetVisualGearValues(circleUid, 1000, 1000)</code> |
379 <code language="lua"> -- set the tint of a visual gear to bright red. |
379 <code language="lua"> -- set the tint of a visual gear to bright red. |
380 SetVisualGearValues(circleUid, nil, nil, nil, nil, nil, nil, nil, nil, nil, 0xff0000ff)</code> |
380 SetVisualGearValues(circleUid, nil, nil, nil, nil, nil, nil, nil, nil, nil, 0xff0000ff)</code> |
381 |
381 |
382 |
|
383 === <tt>!FindPlace(gearUid, fall, left, right[, tryHarder])</tt> === |
|
384 Finds a place for the specified gear between x=`left` and x=`right` and places it there. `tryHarder` is optional, setting it to `true`/`false` will determine whether the engine attempts to make additional passes, even attempting to place gears on top of each other. |
|
385 |
|
386 Example: |
|
387 |
|
388 <code language="lua"> gear = AddGear(...) |
|
389 FindPlace(gear, true, 0, LAND_WIDTH) -- places the gear randomly between 0 and LAND_WIDTH</code> |
|
390 === <tt>HogSay(gearUid, text, manner [,vgState])</tt> === |
|
391 Makes the specified gear say, think, or shout some text in a comic-style speech or thought bubble. `gearUid` is _not_ limited to hedgehogs, altough the function name suggests otherwise. |
|
392 |
|
393 The `manner` parameter specifies the type of the bubble and can have one of these values: |
|
394 |
|
395 || *Value of `manner`* || *Looks* || |
|
396 || `SAY_THINK` || Thought bubble || |
|
397 || `SAY_SAY` || Speech bubble || |
|
398 || `SAY_SHOUT` || Exclamatory bubble (denotes shouting) || |
|
399 |
|
400 There is a optional 4th parameter `vgState`, it defines wheather the speechbubble is drawn fully opaque or semi-transparent. The value `0` is the default value. |
|
401 |
|
402 || *Value of `vgState`* || *Effect* || |
|
403 || `0` || If the specified gear is a hedgehog, and it’s the turn of the hedgehog’s team, the bubble is drawn fully opaque.<br>If the gear is a hedgehog, and it’s another team’s turn, the bubble is drawn translucent.<br>If the gear is not a hedgehog, the bubble is drawn fully opaque. || |
|
404 || `1` || The bubble is drawn translucent. || |
|
405 || `2` || The bubble is drawn fully opaque. || |
|
406 |
|
407 Examples: |
|
408 |
|
409 <code language="lua">HogSay(CurrentHedgehog, "I wonder what to do …", SAY_THINK) -- thought bubble with text “I wonder what to do …”</code> |
|
410 <code language="lua">HogSay(CurrentHedgehog, "I'm hungry.", SAY_SAY) -- speech bubble with text “I’m hungry.”</code> |
|
411 <code language="lua">HogSay(CurrentHedgehog, "I smell CAKE!", SAY_SHOUT) -- exclamatory bubble with text “I smell CAKE!”</code> |
|
412 === <tt>!HogTurnLeft(gearUid, boolean)</tt> === |
|
413 Faces the specified hog left or right. |
|
414 |
|
415 Example: |
|
416 |
|
417 <code language="lua"> HogTurnLeft(CurrentHedgehog, true) -- turns CurrentHedgehog left |
|
418 HogTurnLeft(CurrentHedgehog, false) -- turns CurrentHedgehog right</code> |
|
419 === <tt>!SetGearPosition(gearUid, x, y)</tt> === |
|
420 Places the specified gear exactly at the position (`x`,`y`). Not to be confused with `SetGearPos`. |
|
421 |
|
422 === <tt>SetGearCollisionMask(gearUid, mask)</tt> === |
382 === <tt>SetGearCollisionMask(gearUid, mask)</tt> === |
423 Set the collision mask of the given gear with `gearUid`. |
383 Set the collision mask of the given gear with `gearUid`. |
424 The collision mask defines with which gears and terrain types the gear can collide. |
384 The collision mask defines with which gears and terrain types the gear can collide. |
425 |
385 |
426 `mask` is a number between `0x0000` and `0xFFFF` and used as a bitfield, which means you can combine these flags with `bor`. These are the available flags: |
386 `mask` is a number between `0x0000` and `0xFFFF` and used as a bitfield, which means you can combine these flags with `bor`. These are the available flags: |
448 -- Collide with nothing</code> |
408 -- Collide with nothing</code> |
449 |
409 |
450 There are actual more flags availbable, but they are not as useful for use in Lua and their constants have not been exposed to Lua. You can find the full range of flags in the engine source code (in Pascal): |
410 There are actual more flags availbable, but they are not as useful for use in Lua and their constants have not been exposed to Lua. You can find the full range of flags in the engine source code (in Pascal): |
451 |
411 |
452 [https://hg.hedgewars.org/hedgewars/file/default/hedgewars/uConsts.pas#l112] |
412 [https://hg.hedgewars.org/hedgewars/file/default/hedgewars/uConsts.pas#l112] |
453 |
|
454 === <tt>!SetGearVelocity(gearUid, dx, dy)</tt> === |
|
455 Gives the specified gear the velocity of `dx`, `dy`. |
|
456 |
413 |
457 === <tt>!SetFlightTime(gearUid, flighttime)</tt> === |
414 === <tt>!SetFlightTime(gearUid, flighttime)</tt> === |
458 Sets the `FlightTime` of the given gear to `flighttime`. The meaning of `FlightTime` is explained in the section `GetFlightTime`. |
415 Sets the `FlightTime` of the given gear to `flighttime`. The meaning of `FlightTime` is explained in the section `GetFlightTime`. |
459 |
416 |
460 === <tt>!SetGearElasticity(gearUid, Elasticity) </tt> === |
417 === <tt>!SetGearElasticity(gearUid, Elasticity) </tt> === |
524 if (GetGearType(gear) == gtHedgehog) and (GetHogLevel(gear) > 0) then |
481 if (GetGearType(gear) == gtHedgehog) and (GetHogLevel(gear) > 0) then |
525 SetEffect(gear, hePoisoned, 1) |
482 SetEffect(gear, hePoisoned, 1) |
526 end |
483 end |
527 end</code> |
484 end</code> |
528 |
485 |
529 === <tt>CopyPV(gearUid, gearUid)</tt> === |
|
530 This sets the position and velocity of the second gear to the first one. |
|
531 |
|
532 === <tt>!FollowGear(gearUid)</tt> === |
|
533 Makes the game client follow the specifiec gear (if it exists). Does not work for visual gears. |
|
534 |
|
535 === <tt>!SetHogName(gearUid, name)</tt> === |
486 === <tt>!SetHogName(gearUid, name)</tt> === |
536 Sets the name of the specified hedgehog gear. |
487 Sets the name of the specified hedgehog gear. |
537 |
488 |
538 === <tt>!SetHogTeamName(gearUid, name)</tt> === |
489 === <tt>!SetHogTeamName(gearUid, name)</tt> === |
539 Sets the team name of the specified gear. The gear can be a hedgehog or grave. |
490 Sets the team name of the specified gear. The gear can be a hedgehog or grave. |
540 |
491 |
541 === <tt>!SetHogHat(gearUid, hat)</tt> === |
492 === <tt>!SetHogHat(gearUid, hat)</tt> === |
542 Sets the hat of the specified hedgehog gear. |
493 Sets the hat of the specified hedgehog gear. |
|
494 |
|
495 === <tt>!HogTurnLeft(gearUid, boolean)</tt> === |
|
496 Faces the specified hog left or right. |
|
497 |
|
498 Example: |
|
499 |
|
500 <code language="lua"> HogTurnLeft(CurrentHedgehog, true) -- turns CurrentHedgehog left |
|
501 HogTurnLeft(CurrentHedgehog, false) -- turns CurrentHedgehog right</code> |
543 |
502 |
544 === <tt>!SetGearTarget(gearUid, x, y)</tt> === |
503 === <tt>!SetGearTarget(gearUid, x, y)</tt> === |
545 Sets the x and y coordinate of target-based weapons/utilities. |
504 Sets the x and y coordinate of target-based weapons/utilities. |
546 *Note*: This can’t be used in onGearAdd() but must be called after gear creation. |
505 *Note*: This can’t be used in onGearAdd() but must be called after gear creation. |
547 |
506 |
603 -- This makes AI hogs stop caring about attacking uselessHog</code> |
562 -- This makes AI hogs stop caring about attacking uselessHog</code> |
604 |
563 |
605 === <tt>!SetGearPos(gearUid, value)</tt> === |
564 === <tt>!SetGearPos(gearUid, value)</tt> === |
606 Sets the `Pos` value (not the position!) of the specified gear to specified value. See `GetGearPos` for more information. |
565 Sets the `Pos` value (not the position!) of the specified gear to specified value. See `GetGearPos` for more information. |
607 |
566 |
|
567 === <tt>!HideHog(gearUid)</tt> === |
|
568 Removes a hedgehog from the map. The hidden hedgehog can be restored with `RestoreHog(gearUid)`. Since 0.9.23, returns `true` on success and `false` on failure (if gear does not exist / hog is already hidden). |
|
569 |
|
570 Example: |
|
571 |
|
572 <code language="lua"> gear = AddGear(...) |
|
573 HideHog(gear) -- Hide the newly created gear.</code> |
|
574 |
|
575 === <tt>!RestoreHog(gearUid)</tt> === |
|
576 Restores a previously hidden hedgehog. Nothing happens if the hedgehog does not exist or is not hidden. |
|
577 |
|
578 Example: |
|
579 |
|
580 <code language="lua"> gear = AddGear(...) |
|
581 HideHog(gear) -- Hide the newly created gear. |
|
582 RestoreHog(gear) -- Restore the newly hidden gear.</code> |
|
583 |
|
584 == Functions for gear actions == |
|
585 === <tt>HogSay(gearUid, text, manner [,vgState])</tt> === |
|
586 Makes the specified gear say, think, or shout some text in a comic-style speech or thought bubble. `gearUid` is _not_ limited to hedgehogs, altough the function name suggests otherwise. |
|
587 |
|
588 The `manner` parameter specifies the type of the bubble and can have one of these values: |
|
589 |
|
590 || *Value of `manner`* || *Looks* || |
|
591 || `SAY_THINK` || Thought bubble || |
|
592 || `SAY_SAY` || Speech bubble || |
|
593 || `SAY_SHOUT` || Exclamatory bubble (denotes shouting) || |
|
594 |
|
595 There is a optional 4th parameter `vgState`, it defines wheather the speechbubble is drawn fully opaque or semi-transparent. The value `0` is the default value. |
|
596 |
|
597 || *Value of `vgState`* || *Effect* || |
|
598 || `0` || If the specified gear is a hedgehog, and it’s the turn of the hedgehog’s team, the bubble is drawn fully opaque.<br>If the gear is a hedgehog, and it’s another team’s turn, the bubble is drawn translucent.<br>If the gear is not a hedgehog, the bubble is drawn fully opaque. || |
|
599 || `1` || The bubble is drawn translucent. || |
|
600 || `2` || The bubble is drawn fully opaque. || |
|
601 |
|
602 Examples: |
|
603 |
|
604 <code language="lua">HogSay(CurrentHedgehog, "I wonder what to do …", SAY_THINK) -- thought bubble with text “I wonder what to do …”</code> |
|
605 <code language="lua">HogSay(CurrentHedgehog, "I'm hungry.", SAY_SAY) -- speech bubble with text “I’m hungry.”</code> |
|
606 <code language="lua">HogSay(CurrentHedgehog, "I smell CAKE!", SAY_SHOUT) -- exclamatory bubble with text “I smell CAKE!”</code> |
|
607 |
|
608 === <tt>!FollowGear(gearUid)</tt> === |
|
609 Makes the game client follow the specifiec gear (if it exists). Does not work for visual gears. |
|
610 |
608 == Functions to delete gears == |
611 == Functions to delete gears == |
609 === <tt>!DeleteGear(gearUid)</tt> === |
612 === <tt>!DeleteGear(gearUid)</tt> === |
610 Deletes a gear. If the specified gear did not exist, nothing happens. |
613 Deletes a gear. If the specified gear did not exist, nothing happens. |
611 |
614 |
612 Example: |
615 Example: |