tModLoader How to make an infinite flight accessory?

UtsuhoReiuji29

Terrarian
I have been trying to create an accessory similar to the Soaring Insignia from 1.4 (The accessory that allows infinite flight without counting as wings or rocket boots), but I am unable to code it properly without a searing headache. Would someone be able to help me code this correctly? If so, I will credit you. Unless you don't want me to, up to you. Regardless, please help!

(Accessory name: The ForeverFlight)

Thank you so much,
-UtsuhoReiuji29
 
I have been trying to create an accessory similar to the Soaring Insignia from 1.4 (The accessory that allows infinite flight without counting as wings or rocket boots), but I am unable to code it properly without a searing headache. Would someone be able to help me code this correctly? If so, I will credit you. Unless you don't want me to, up to you. Regardless, please help!

(Accessory name: The ForeverFlight)

Thank you so much,
-UtsuhoReiuji29
i figured it out:

public override void UpdateAccessory(Player player, bool hideVisual)
{
player.wingTime = 99999999999999f;
}
I put a lot of 9's there because that is the only way I know how to do it, but you could set the flight time to any value or even do += to add time or *= to multiply it by a time
 
Last edited:
Back
Top Bottom