Having trouble with name detector

Ask any questions you may have here.

Having trouble with name detector

Postby enriched » 13 January 2019, 11:59

It doesn't hurt to ask another question, so i'm wondering how do you get variables to give a gun only to the mapmaker with the command "-gun" and it only gives a gun to the mapmaker no one else by detecting only for their login name. I've tried this multiple times and have failed, evaluate my test map and see what I did wrong
ID is " enriched-namedetest "
Last edited by enriched on 13 January 2019, 14:36, edited 1 time in total.
User avatar
enriched
Recruit
 
Posts: 16
Joined: 18 August 2017, 16:07

Re: Having trouble with name detector

Postby darkstar 1 » 13 January 2019, 12:11

Can't find the problem in the map if it isn't open sourced

Well, maybe you made one of the common mistakes, so make sure to check that

- Did you use the nickname or displayed name for the name detection? In single player the displayed name is the character model name, so if you used the displayed name, switch to the nickname instead.

- If you used the "Continue trigger actions execution only if variable A equals variable B" trigger action, change it to "Continue trigger actions execution only if variable A equals value B"
http://www.plazmaburst2.com/?s=2&map=darkstar%201-pixels
User avatar
darkstar 1
Lite Marine [800]
 
Posts: 848
Joined: 13 September 2014, 13:20
Location: Here... or there :|

Re: Having trouble with name detector

Postby enriched » 13 January 2019, 12:24

User avatar
enriched
Recruit
 
Posts: 16
Joined: 18 August 2017, 16:07

Re: Having trouble with name detector

Postby darkstar 1 » 13 January 2019, 13:10

So, you have the timer and trigger at one call both, that's good, #trigger*2 only needs the "set trigger A as chat message receiver" that sets another trigger (#trigger*4 in my test map) with infinite calls as the chat message receiver.
What this does is executing #trigger*4 each time somebody says something in the chat, hence why it's on infinite calls, otherwise it wouldn't work after the first message in the chat.

You also tried assigning two values to the same variable, a variable can only hold one value at a time, so you'll need two.

The last thing you have to do is continuing executing trigger actions when the first variable (for the text) equals the command value (-gun) and the same for the name value (your nickname).


A thing I noticed is that nicknames don't work in singleplayer, so if you wanna test stuff with commands only for a specific player, you'll have to test it in multiplayer.

And I don't know if it's fixed, but sometimes, when you use the trigger action to move guns to a region, it doesn't always work the first time, so if you have trouble with that, try executing it more than once in a short period of time.




In case you need it (tell me when to remove it from my account again):
https://www.plazmaburst2.com/level_editor/map_edit.php?filename=darkstar%201-guntest
http://www.plazmaburst2.com/?s=2&map=darkstar%201-pixels
User avatar
darkstar 1
Lite Marine [800]
 
Posts: 848
Joined: 13 September 2014, 13:20
Location: Here... or there :|

Re: Having trouble with name detector

Postby enriched » 13 January 2019, 14:00

https://prnt.sc/m6krcx

I will use your test map as a guide if I ever struggle with name detectors, thank you very much for all you have done for me.
User avatar
enriched
Recruit
 
Posts: 16
Joined: 18 August 2017, 16:07


Return to Questions

Who is online

Users browsing this forum: No registered users