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

**URL:** <https://forums.unrealengine.com/t/i-want-to-set-the-players-attack-power-to-0/1158321>\
**Category:** Verse\
**Tags:** unreal-editor-for-fortnite, fortnite-creative, question, fortnite\
**Created:** [May 8, 2023, 1:45am UTC](https://forums.unrealengine.com/t/i-want-to-set-the-players-attack-power-to-0/1158321 "2023-05-08T01:45:24Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![\_SAPO](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/_sapo/32/689022_2.png) [@\_SAPO](https://forums.unrealengine.com/u/_SAPO)\
**Post date:** [May 8, 2023, 1:45am UTC](https://forums.unrealengine.com/t/i-want-to-set-the-players-attack-power-to-0/1158321/1 "2023-05-08T01:45:24Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Samvangelist](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/samvangelist/32/924139_2.png) [@Samvangelist](https://forums.unrealengine.com/u/Samvangelist)\
**Post date:** [May 8, 2023, 5:32pm UTC](https://forums.unrealengine.com/t/i-want-to-set-the-players-attack-power-to-0/1158321/2 "2023-05-08T17:32:37Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![\_SAPO](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/_sapo/32/689022_2.png) [@\_SAPO](https://forums.unrealengine.com/u/_SAPO)\
**Post date:** [May 10, 2023, 5:44am UTC](https://forums.unrealengine.com/t/i-want-to-set-the-players-attack-power-to-0/1158321/3 "2023-05-10T05:44:47Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![im\_a\_lama](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/im_a_lama/32/995063_2.png) [@im\_a\_lama](https://forums.unrealengine.com/u/im_a_lama)\
**Post date:** [May 11, 2023, 5:38pm UTC](https://forums.unrealengine.com/t/i-want-to-set-the-players-attack-power-to-0/1158321/4 "2023-05-11T17:38:20Z")

</div>

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)

---

<div class="post-metadata">

**Author:** ![\_SAPO](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/_sapo/32/689022_2.png) [@\_SAPO](https://forums.unrealengine.com/u/_SAPO)\
**Post date:** [May 14, 2023, 5:50am UTC](https://forums.unrealengine.com/t/i-want-to-set-the-players-attack-power-to-0/1158321/6 "2023-05-14T05:50:54Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![im\_a\_lama](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/im_a_lama/32/995063_2.png) [@im\_a\_lama](https://forums.unrealengine.com/u/im_a_lama)\
**Post date:** [May 14, 2023, 8:36pm UTC](https://forums.unrealengine.com/t/i-want-to-set-the-players-attack-power-to-0/1158321/7 "2023-05-14T20:36:15Z")

</div>

Something like this could work :

```auto
    @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 😃

---

<div class="post-metadata">

**Author:** ![\_SAPO](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/_sapo/32/689022_2.png) [@\_SAPO](https://forums.unrealengine.com/u/_SAPO)\
**Post date:** [May 15, 2023, 2:15am UTC](https://forums.unrealengine.com/t/i-want-to-set-the-players-attack-power-to-0/1158321/8 "2023-05-15T02:15:07Z")

</div>

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.
