I think you'll have to give it a different name and texture if you want to do that, but I'm not sure. I can help you code it.I would want to make the Mana Flower to not trigger the "Mana Sickness" buff if possible, to give it a real use. I'm not sure about my sentence, but English is not my main language, so sorry
I think you'll have to give it a different name and texture if you want to do that, but I'm not sure. I can help you code it.
...wouldn't it be easier to just remove the buff if found on player?
If it's just for yourself, you don't need to change anything.I don't plan to upload it here, it's just for a personnal use. It may sound selfish, I know, but I'm not comfortable with making something public. If it's just for me, do I really have to make a different texture ? And can I directly view the code of the Mana Sickess buff (i think it's the thing to mod, not the Mana Flower itself if I understood the tutorials correctly) ?
If it's just for yourself, you don't need to change anything.
IDK how to do that, ask him.Wonderful. So, how do I do the thing Shockah suggest ? If it's simplier, it's better :3
IDK how to do that, ask him.
Some method in the Player class. Hell if I remember, I'm at work.
public override void PostUpdate()
For whatever stupid reason I didn't relize those were a thing earlier but on my researches I was only aware of PostUpdate. Turns out Both PreUpdate and MidUpdate are same type and don't have any parameters, so they'll work too.You could try using PreUpdate or MidUpdate too. Again, can't check whether one of these would help.
using System;
using System.Diagnostics;
using System.Collections.Generic;
using System.IO;
using System.Runtime.InteropServices;
using System.Text;
using System.Linq;
using System.Threading;
using System.Windows.Forms;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
using TAPI;
namespace YourMod
{
public class MPlayer : TAPI.ModPlayer
{
public override void MidUpdate()
{
for (int index = 0; index < 22; ++index)
{
if (player.buffType[index] == 94)
{
player.buffTime[index] = 0;
player.buffType[index] = 0;
}
}
}
}
}