How to I fix the Error without changing everything to a string? [Worked Around]
Can I get the players use button? [Sovled]
Help with function that knows when the player is looking at a trigger [Moving to new thread]
I have made a script that takes the SetHintString() and makes it a Hud instead. My hud shows up with Press and hold &&1 to, blah blah blah, so I want to change that to the players use button. I have been trying to parse the string by turning it into tokens and then concatenate it back together, but StrTok with not work on this:
Code Snippet
Plaintext
&"ZOMBIE_WEAPON_PPSH_2000"
If I print If I change the above to something like "Press &&1 to buy ppsh", then I am only left with trying to figure out what the users USE button is. I tried:
Code Snippet
Plaintext
usekey = getKeyBinding("+activate");
but am having no luck with that either.
I can get a string, that I pass in, to parse and I replaced &&1 with USE, but this isn't really what I set out to do.
Code Snippet
Plaintext
//I thread FixHint("Press &&1 to buy ppsh") and it works like I want except for use button.
Above comes out, Press USE to buy ppsh, for the strings, but when it is &"ZOMBIE_WEAPON_PPSH_2000", it crashes the map to the menu screen and says Error: Attempted to overrun string in call to va().
Edit: Removed part about looking at to close this thread
Last Edit: June 25, 2014, 12:19:35 pm by MakeCents
How to I fix the Error without changing everything to a string?
Can I get the players use button?
Help with function that knows when the player is looking at a trigger
I have made a script that takes the SetHintString() and makes it a Hud instead. My hud shows up with Press and hold &&1 to, blah blah blah, so I want to change that to the players use button. I have been trying to parse the string by turning it into tokens and then concatenate it back together, but StrTok with not work on this:
Code Snippet
Plaintext
&"ZOMBIE_WEAPON_PPSH_2000"
If I print If I change the above to something like "Press &&1 to buy ppsh", then I am only left with trying to figure out what the users USE button is. I tried:
Code Snippet
Plaintext
usekey = getKeyBinding("+activate");
but am having no luck with that either.
I can get a string, that I pass in, to parse and I replaced &&1 with USE, but this isn't really what I set out to do.
Code Snippet
Plaintext
//I thread FixHint("Press &&1 to buy ppsh") and it works like I want except for use button.
Above comes out, Press USE to buy ppsh, for the strings, but when it is &"ZOMBIE_WEAPON_PPSH_2000", it crashes the map to the menu screen and says Error: Attempted to overrun string in call to va().
Lastly, I was trying to use:
Code Snippet
Plaintext
player isLookingAt(trigger);
but it kept return 0, even when I was looking at the trigger. Any help with a function that works like that one sounds like it should, or what I may be doing wrong?
Press [{+activate}] to blegh. Edit: That string error, have you precached the string as well as set it in a str file and then included in your map's ff patch?
Last Edit: June 24, 2014, 04:46:13 am by DidUknowiPwn
Press [{+activate}] to blegh. Edit: That string error, have you precached the string as well as set it in a str file and then included in your map's ff patch?
Thank you so much for the first part!!! +1 for you! The second part: I am taking the _zombiemode_weapons.gsc and taking the strings that are there already as a variable passed into my new function.
y are u trying to make it a hud? isnt a hintstring good enough?
I am working on a hint string to hud replacement script. When I made my last map I ran into a tremendous amount of frustration because of the limitations with hint strings. Also, I have watched people play my map and depending on how they play it, some hint strings never get a chance to show, and it can be confusing then. I removed so many hint strings but I don't like that answer. I like the hints and I want more of them. Someone recommended I make them a hud. I have done that, but now I want to make my script more useful, and I decided to start with the weapons, since they take up 2 hint strings. I will be moving onto perk machines and then just a generic hint string hud. I intend to handle all of these with one script, thus taking some of the load off of the SetHintString() function. I know the hud has its limits too since I have also passed them, but they are easier to work around for me.
Last Edit: June 24, 2014, 05:07:53 am by MakeCents
[edit]ignore me[/edit] will check when I'm awake again ~10 hours
Lol, its cool. I think I have a work around, but it would be nicer not to have to. I might just take the weapon name and remove zombie from it if it is in it. Not as pretty, but it is getting the job done. If you think of anything, let me know.
Edit: The more I use this work around, the more I reinvent the wheel. Hope there is some way to make this a string or replace the &&1 with the players use button.
Thanks again.
Last Edit: June 24, 2014, 01:20:50 pm by MakeCents