0
Under review

default weapon

Leoh 3 months ago in Melee updated 2 months ago 3

Hello.

This is my first message here, so thanks for the game creator.

I'm new on unity and the game creator, I think it's very simple but how can we have a weapon always equiped by default (to receive damages).

I can give a weapon at the beginning of the scene but then when I equip another weapon and I un-equip it I find myself without a weapon to receive damage.

Unity version:
2019.4.0f1
Game Creator version:
1.1.2
Under review

Hi and welcome to the Game Creator forum. Not sure I fully understood your question. So when you equip another weapon, the player is weapon-less?

Do you have any error in the console? If so, would you mind sharing it? If that' not the case, a video screencapturing the problem would greatly help us narrow down the problem. Thanks!

Thank you for your response.

I misspoke:

for example for the "state" we can put one by default, which allows when we un-equip a weapon to return to the default state.

And is it possible to do the same for weapons?

Because currently I launch a trigger at the start which gives me the default "weapon" to receive the hits, but when I equip a new weapon (everything works well), but when I un-equip it, I don't have any more weapon and so I don't take the hits anymore. (Sorry about my bad English.)

I solved my problem with a variable and a condition.

First I followed RVR tutorial: https://www.youtube.com/watch?v=kRM7Rh0O1HA


Then I created an "unarmed" variable

that I activated by default  + one trigger on startup.


Modify the clauses

And I disable/enable the variable in the action.

Then I created a new trigger.


Now even when I put away my sword I can get hit.

Does he have an easier way to do it?