131 </blockquote> |
131 </blockquote> |
132 Example: |
132 Example: |
133 |
133 |
134 <code lang="lua"> !SetAmmo(amLaserSight, 0, 0, 0, 1) |
134 <code lang="lua"> !SetAmmo(amLaserSight, 0, 0, 0, 1) |
135 !SpawnUtilityCrate(0, 0, amLaserSight)</code> |
135 !SpawnUtilityCrate(0, 0, amLaserSight)</code> |
136 === <tt>!AddTeam(teamname, color, grave, fort, voicepack)</tt> === |
136 === <tt>!AddTeam(teamname, color, grave, fort, voicepack, flag)</tt> === |
137 |
137 |
138 <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 and voicepack settings. |
138 <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. |
139 </blockquote> |
139 </blockquote> |
140 Notice: This works only for singleplayers training missions for now and will desync multiplayer games. |
140 Notice: This works only for singleplayers training missions for now and will desync multiplayer games. Flag setting is dev only. |
141 |
141 |
142 Example: |
142 Example: |
143 |
143 |
144 <code lang="lua"> !AddTeam("team 1", 14483456, "Simple", "Island", "Default")</code> |
144 <code lang="lua"> !AddTeam("team 1", 14483456, "Simple", "Island", "Default", "hedgewars")</code> |
145 === <tt>!AddHog(hogname, botlevel, health, hat)</tt> === |
145 === <tt>!AddHog(hogname, botlevel, health, hat)</tt> === |
146 |
146 |
147 <blockquote>Adds a new hedgehog for current team (last created one), with botlevel and specified health also head. |
147 <blockquote>Adds a new hedgehog for current team (last created one), with botlevel and specified health also head. |
148 </blockquote> |
148 </blockquote> |
149 Notice: This works only for singleplayers training missions for now and will desync multiplayer games. |
149 Notice: This works only for singleplayers training missions for now and will desync multiplayer games. |
277 !HogTurnLeft(!CurrentHedgehog, false) -- turns !CurrentHedgehog right</code> |
277 !HogTurnLeft(!CurrentHedgehog, false) -- turns !CurrentHedgehog right</code> |
278 === <tt>!SetGearPosition(gearUid, x, y)</tt> === |
278 === <tt>!SetGearPosition(gearUid, x, y)</tt> === |
279 |
279 |
280 <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> |
281 </blockquote> |
282 === <tt>!SetGearVelocity(gearUid, dx, dy)</tt> === |
282 === <tt>!SetGearVelocity(gearUid, dx, dy)</tt> (dev) === |
283 |
283 |
284 <blockquote>Gives the specified gear the velocity of dx, dy. |
284 <blockquote>Gives the specified gear the velocity of dx, dy. |
285 </blockquote> |
285 </blockquote> |
286 === <tt>!SetAmmo(ammoType, count, probability, delay, numberInCrate)</tt> === |
286 === <tt>!SetAmmo(ammoType, count, probability, delay, numberInCrate)</tt> === |
287 |
287 |