2971 -- some kind of target detected, tell me your story |
2971 -- some kind of target detected, tell me your story |
2972 if cGear ~= nil then |
2972 if cGear ~= nil then |
2973 |
2973 |
2974 x,y = GetGearTarget(cGear) |
2974 x,y = GetGearTarget(cGear) |
2975 |
2975 |
2976 AddCaption(GetGearPos(cGear)) |
|
2977 if GetGearType(cGear) == gtAirAttack and GetCurAmmoType() == amAirAttack then |
2976 if GetGearType(cGear) == gtAirAttack and GetCurAmmoType() == amAirAttack then |
2978 DeleteGear(cGear) |
2977 DeleteGear(cGear) |
2979 PlaceObject(x, y) |
2978 PlaceObject(x, y) |
2980 elseif GetGearType(cGear) == gtGirder then |
2979 elseif GetGearType(cGear) == gtGirder then |
2981 |
2980 |
3223 -- timer of mines |
3222 -- timer of mines |
3224 -- contents of crates etc. |
3223 -- contents of crates etc. |
3225 --------------------------------------------------------------- |
3224 --------------------------------------------------------------- |
3226 function onLeft() |
3225 function onLeft() |
3227 |
3226 |
3228 leftHeld = true |
3227 if (curWep == amAirAttack) then |
3229 rightHeld = false |
3228 leftHeld = true |
3230 |
3229 rightHeld = false |
3231 if preciseOn then |
3230 |
3232 if cat[cIndex] == loc("Sprite Placement Mode") then |
3231 if preciseOn then |
3233 sFrame = sFrame - 1 |
3232 if cat[cIndex] == loc("Sprite Placement Mode") then |
3234 if sFrame < 0 then |
3233 sFrame = sFrame - 1 |
3235 sFrame = reducedSpriteIDArrayFrames[pIndex] - 1 |
3234 if sFrame < 0 then |
3236 end |
3235 sFrame = reducedSpriteIDArrayFrames[pIndex] - 1 |
3237 end |
3236 end |
3238 else |
3237 end |
3239 pIndex = pIndex - 1 |
3238 else |
3240 if pIndex == 0 then |
3239 pIndex = pIndex - 1 |
3241 pIndex = #pMode |
3240 if pIndex == 0 then |
3242 end |
3241 pIndex = #pMode |
3243 if cat[cIndex] == loc("Sprite Placement Mode") then |
3242 end |
3244 sFrame = math.min(sFrame, reducedSpriteIDArrayFrames[pIndex] - 1) |
3243 if cat[cIndex] == loc("Sprite Placement Mode") then |
3245 end |
3244 sFrame = math.min(sFrame, reducedSpriteIDArrayFrames[pIndex] - 1) |
3246 |
3245 end |
3247 if (curWep == amGirder) or (curWep == amRubber) or (curWep == amAirAttack) then |
3246 |
3248 showSecondaryMessage() |
3247 if (curWep == amGirder) or (curWep == amRubber) or (curWep == amAirAttack) then |
|
3248 showSecondaryMessage() |
|
3249 end |
3249 end |
3250 end |
3250 end |
3251 end |
3251 |
3252 |
3252 end |
3253 end |
3253 |
3254 |
3254 function onRight() |
3255 function onRight() |
3255 |
3256 |
3256 leftHeld = false |
3257 if (curWep == amAirAttack) then |
3257 rightHeld = true |
3258 leftHeld = false |
3258 |
3259 rightHeld = true |
3259 if preciseOn then |
3260 |
3260 if cat[cIndex] == loc("Sprite Placement Mode") then |
3261 if preciseOn then |
3261 sFrame = sFrame + 1 |
3262 if cat[cIndex] == loc("Sprite Placement Mode") then |
3262 if sFrame >= reducedSpriteIDArrayFrames[pIndex] then |
3263 sFrame = sFrame + 1 |
3263 sFrame = 0 |
3264 if sFrame >= reducedSpriteIDArrayFrames[pIndex] then |
3264 end |
3265 sFrame = 0 |
3265 end |
3266 end |
3266 else |
3267 end |
3267 pIndex = pIndex + 1 |
3268 else |
3268 if pIndex > #pMode then |
3269 pIndex = pIndex + 1 |
3269 pIndex = 1 |
3270 if pIndex > #pMode then |
3270 end |
3271 pIndex = 1 |
3271 if cat[cIndex] == loc("Sprite Placement Mode") then |
3272 end |
3272 sFrame = math.min(sFrame, reducedSpriteIDArrayFrames[pIndex] - 1) |
3273 if cat[cIndex] == loc("Sprite Placement Mode") then |
3273 end |
3274 sFrame = math.min(sFrame, reducedSpriteIDArrayFrames[pIndex] - 1) |
3274 |
3275 end |
3275 if (curWep == amGirder) or (curWep == amRubber) or (curWep == amAirAttack) then |
3276 |
3276 showSecondaryMessage() |
3277 if (curWep == amGirder) or (curWep == amRubber) or (curWep == amAirAttack) then |
|
3278 showSecondaryMessage() |
|
3279 end |
3277 end |
3280 end |
3278 end |
3281 end |
3279 |
3282 |
3280 end |
3283 end |
3281 |
3284 |