I want to set the player's attack power to 0.

I want to set the attack power of players within a certain area to 0. Since using the “Damage Amplifier Powerup” causes a glowing effect on the player and there doesn’t seem to be a way to remove that effect at the moment, I’m looking for an alternative method.
I’m considering the following options:

  1. Set the attack power of only players within the zone to 0
  2. Set the attack power to 0 when the player spawns, and restore it when they enter a teleporter
  3. Set the attack power to 0 when the player presses a button, and restore it when they press another button

Is it possible to achieve any of these functionalities using Verse?

1 Like

Quick question - is there a reason you want players to still be able to attack but do no damage?

Otherwise you could just disable weapons fire with a Mutator Zone.

1 Like

I want to allow fishing in a specific area, but when I use a Mutator Zone, it also prohibits the use of fishing rods.

You could try to set some agents Invincible, don’t know if it would work in your case though. (fort_character.SetVulnerability(false))

You could also try to remove the player weapons and then grant them again later, but it requires a bit of a setup and won’t be doable in every situation.

I also noticed players are not able to attack anymore when you go too far away from spawn (but this might just be a bug on my map :D)

1 Like

Thank you for your idea.
I’d like to try using “fort_character.SetVulnerability(false)”, but I’m still not quite understanding how to use Verse.
If I want to make users who have activated the trigger device invincible, how should I write the code?
I’ve read through a few Verse tutorials but I’m still not fully grasping it.

If there are any easy-to-understand tutorials, could you please provide me with the URL?

Something like this could work :

    @editable # So you can reference it in UEFN
    MyTrigger : trigger_device = trigger_device{}

    OnBegin<override>()<suspends>:void=
        MyTrigger.TriggeredEvent.Subscribe(MyEventListener) # Tell MyTrigger to call MyEventListener when the "TriggeredEvent" happens (when it triggers basically)

    # Function has to take one argument of type '?agent' because this is what the above TriggeredEvent is waiting for
    MyEventListener(MaybeAgent: ?agent) : void =
        if(Agent := MaybeAgent?, Character := Agent.GetFortCharacter[]): # Unwrap the optional (?agent) because you can trigger a trigger without an agent, then get the fort_character of the agent (which can fail too if the agent is spectating for example), agent != fort_character, fort_character is the in-game 3d model of the agent controlling it (you behind your keyboard)
            Character.SetVulnerability(false)

Hope I was clear enough, go ahead if you have more questions. As of learning Verse, I personally went through all the guides epic provides in the order (without the minigames tutorials), but I’m a dev so it’s different I guess :smiley:

2 Likes

I was able to implement it thanks to you! Thank you so much!
I will be doing more tests from here on, but it seems to be going well.
I also understood how to link Verse with devices, so I think I can apply it. Thank you very much again.

1 Like