gta-chaos-mod / Trilogy-ASI-Script

The ASI script for the GTA Trilogy (SA only for now, 3 and VC may follow later on)
GNU General Public License v3.0
141 stars 21 forks source link

New swimming effects #195

Closed gromchek closed 1 year ago

gromchek commented 1 year ago

Swim like Tommy - player takes full health damage in ~5 sec Disable swimming - disable controls in water

Lordmau5 commented 1 year ago

Oh also I forgot to add that in the review, you can credit yourself at the top of the files if you want Honestly, I'd even prefer that :)

Something like // Effect by gromcheck or similar

gromchek commented 1 year ago

Fixed

Lordmau5 commented 1 year ago

Dunno why it failed with the compilation... I managed to compile it just fine locally

I'll get this merged and also push the effects in the GUI, but I'm not sure when I'll be able to get out a new version with these

Lordmau5 commented 1 year ago

Alright so I went ahead and checked if the effects even work properly just now LMAO Should've done that before...

Either way - Swim Like Tommy drains the player's health when they are in the water, but neither of the 2 effects actually disable swimming controls, or controls at all, for me... Which is interesting. I know other effects like Let's Take A Break do it properly so I'm pretty confused myself ...

A-ha! I found the culprit!

if (!player || !FindPlayerVehicle (-1, false)) return;

So you're checking if the player is false / null (which makes sense) OR if the Vehicle is false / null. This means the effect will only work when the player is in a vehicle AND submerged in water I'll get that fixed in a commit in a bit :)

I'd also like to remove the "submerged in water" check and only go for "GetTaskSwim" instead. Would that be okay with you? Because otherwise the moment CJ get's his feet wet (as in, just standing in a puddle) he won't be able to move (or in Swim Like Tommy's case, will lose health)