UGX-Mods

Call of Duty 5: World at War => Help Desk => Scripting => Topic started by: KDXDARK on November 16, 2015, 10:20:23 pm

Title: hintstring doesnt update
Post by: KDXDARK on November 16, 2015, 10:20:23 pm
Hi for some reason my hintstring doesnt update. I already use this treminaor tutorial http://ugx-mods.com/wiki/index.php?title=Hintstrings_not_updating (http://ugx-mods.com/wiki/index.php?title=Hintstrings_not_updating) but for some reason it dont show me the string while in game.

somebody can help me to fix this?
Title: Re: hintstring doesnt update
Post by: alaurenc9 on November 16, 2015, 10:33:23 pm
try mine

http://ugx-mods.com/forum/index.php/topic,6753.0.html (http://ugx-mods.com/forum/index.php/topic,6753.0.html)
Title: Re: hintstring doesnt update
Post by: KDXDARK on November 16, 2015, 11:02:51 pm
try mine

http://ugx-mods.com/forum/index.php/topic,6753.0.html (http://ugx-mods.com/forum/index.php/topic,6753.0.html)
i try it and it dont show the string in-game same as trem tutorial
Title: Re: hintstring doesnt update
Post by: Harry Bo21 on November 16, 2015, 11:11:54 pm
i try it and it dont show the string in-game same as trem tutorial
thats because it "is" trems hintstring fix that he just made a minor modification to
Title: Re: hintstring doesnt update
Post by: MakeCents on November 17, 2015, 12:59:49 am
thats because it "is" trems hintstring fix that he just made a minor modification to

Lol, who is this kid?

Is it all our just one of the hint strings that use trems fix?

If it is all, it could be a menu error. If it is just one, it could be a gsc issue.
Title: Re: hintstring doesnt update
Post by: alaurenc9 on November 17, 2015, 02:36:47 am
thats because it "is" trems hintstring fix that he just made a minor modification to

yes but i had trem's not show up but with my modifications it seemed to work so thought it might work for him too
Title: Re: hintstring doesnt update
Post by: HitmanVere on November 17, 2015, 01:41:55 pm
Try doing this in script:

Code Snippet
Plaintext
ent _setHintstring("");
wait 0.1;
ent _setHintstring("What you want in hintstring");

I am having similar problem, but after I change the hintstring in script, it updates. And also, did you add this in top of script:

Code Snippet
Plaintext
#include maps\trem_hintstrings;

Edit: Just tested with one of my hintstrings, which didnt add text at first, wait 1; fixed it for me
Title: Re: hintstring doesnt update
Post by: gamer9294 on November 23, 2015, 12:17:41 pm
Try doing this in script:

Code Snippet
Plaintext
ent _setHintstring("");
wait 0.1;
ent _setHintstring("What you want in hintstring");

I am having similar problem, but after I change the hintstring in script, it updates. And also, did you add this in top of script:

Code Snippet
Plaintext
#include maps\trem_hintstrings;

Edit: Just tested with one of my hintstrings, which didnt add text at first, wait 1; fixed it for me

Hi HitmanVere,

I have tried your option about the hintstring.

only I get a strange effect ingame on the hinstrings.

when I'm by a trigger and it will show the hintstring text,  it is flashing between the hinstring text with nothing and the hintstring text that I want.

Code Snippet
Plaintext
ent _setHintstring("");
wait 1;
ent _setHintstring("What you want in hintstring");

The first sethinstring is not in a loop.
but is the sethintstring holding the text that I have written or something ?


Best regards,
Gamer9294  :)
Title: Re: hintstring doesnt update
Post by: HitmanVere on November 23, 2015, 12:23:53 pm
Hi HitmanVere,

I have tried your option about the hintstring.

only I get a strange effect ingame on the hinstrings.

when I'm by a trigger and it will show the hintstring text,  it is flashing between the hinstring text with nothing and the hintstring text that I want.

Code Snippet
Plaintext
ent _setHintstring("");
wait 1;
ent _setHintstring("What you want in hintstring");

The first sethinstring is not in a loop.
but is the sethintstring holding the text that I have written or something ?


Best regards,
Gamer9294  :)

Show whole function and how its threaded. Sounds like thread or function itself might be looping, which makes it being set multiple times between the two. Those lines are fine
Title: Re: hintstring doesnt update
Post by: gamer9294 on November 23, 2015, 06:17:26 pm
Show whole function and how its threaded. Sounds like thread or function itself might be looping, which makes it being set multiple times between the two. Those lines are fine


Oké is good,
here under, that is code that I also use for the hintstring fix:


Code Snippet
Plaintext
	packages = getEntArray("ammobox_packages1","targetname"); //box model
for(i=0; i<packages.size; i++)
{
packages[i] thread dropping_packages();
}


dropping_packages()
{
player = undefined;

trig = spawn("trigger_radius", self.origin, 0, 48, 64); //trigger

trig _SetHintString(" ");
wait 1;

while(1)
{
trig _SetHintString("Press and Hold &&1 to Pickup some Ammo [cost: 500]");
trig SetCursorHint("HINT_NOICON");
trig UseTriggerRequireLookAt();
trig waittill("trigger", player);
if(player UseButtonPressed() && !player maps\_laststand::player_is_in_laststand() && !player in_revive_trigger())
{
if(player.score >= 500)
{
player playsound("cha_ching");
player thread maps\_zombiemode_score::minus_to_player_score(500);
//weapons = player GetWeaponsList();
currentweapon = player GetCurrentWeapon();
player giveMaxAmmo(currentweapon);
player iprintlnbold("you have now max ammo on your weapon");
wait 0.1;
trig delete();
self delete();
wait 0.1;
break;
}
else
{
player playsound("no_cha_ching");
player iprintlnbold("you don't have enough points");
wait 1;
}
}
wait 0.1;
}
}

I put the empty sethintstring before the loop to make sure that it will not show that one first.



sorry for if I have errors in the script, I'm still learning how scripting works  8) ;)


Best regards,
Gamer9294

Title: Re: hintstring doesnt update
Post by: HitmanVere on November 23, 2015, 06:32:53 pm

Oké is good,
here under, that is code that I also use for the hintstring fix:


Code Snippet
Plaintext
	packages = getEntArray("ammobox_packages1","targetname"); //box model
for(i=0; i<packages.size; i++)
{
packages[i] thread dropping_packages();
}


dropping_packages()
{
player = undefined;

trig = spawn("trigger_radius", self.origin, 0, 48, 64); //trigger

trig _SetHintString(" ");
wait 1;

while(1)
{
trig _SetHintString("Press and Hold &&1 to Pickup some Ammo [cost: 500]");
trig SetCursorHint("HINT_NOICON");
trig UseTriggerRequireLookAt();
trig waittill("trigger", player);
if(player UseButtonPressed() && !player maps\_laststand::player_is_in_laststand() && !player in_revive_trigger())
{
if(player.score >= 500)
{
player playsound("cha_ching");
player thread maps\_zombiemode_score::minus_to_player_score(500);
//weapons = player GetWeaponsList();
currentweapon = player GetCurrentWeapon();
player giveMaxAmmo(currentweapon);
player iprintlnbold("you have now max ammo on your weapon");
wait 0.1;
trig delete();
self delete();
wait 0.1;
break;
}
else
{
player playsound("no_cha_ching");
player iprintlnbold("you don't have enough points");
wait 1;
}
}
wait 0.1;
}
}

I put the empty sethintstring before the loop to make sure that it will not show that one first.



sorry for if I have errors in the script, I'm still learning how scripting works  8) ;)


Best regards,
Gamer9294



Move all this:

Code Snippet
Plaintext
trig _SetHintString("Press and Hold &&1 to Pickup some Ammo [cost: 500]");
trig SetCursorHint("HINT_NOICON");
trig UseTriggerRequireLookAt();

Under wait, you dont need to keep updating the hintstring or the icon
Title: Re: hintstring doesnt update
Post by: gamer9294 on November 23, 2015, 10:07:10 pm
Move all this:

Code Snippet
Plaintext
trig _SetHintString("Press and Hold &&1 to Pickup some Ammo [cost: 500]");
trig SetCursorHint("HINT_NOICON");
trig UseTriggerRequireLookAt();

Under wait, you dont need to keep updating the hintstring or the icon


Okay thank you very much for you help HitmanVere  8)  ;)

Best regards,
Gamer9294
Title: Re: hintstring doesnt update
Post by: Harry Bo21 on November 23, 2015, 10:24:52 pm
might also wanna add these checks to yours

Code Snippet
Plaintext
player isThrowingGrenade()
- to check if they are mid way through throwing a grenade or currentWeapon will return it

Code Snippet
Plaintext
if ( isDefined( player.is_drinking ) && player.isDrinking ) )
- to check if player is drinking a perk, or again currentWeapon will return wrong

Add those and I think you are all good, but I swear im forgetting at least one more thing
Title: Re: hintstring doesnt update
Post by: gamer9294 on November 24, 2015, 10:46:34 am
might also wanna add these checks to yours

Code Snippet
Plaintext
player isThrowingGrenade()
- to check if they are mid way through throwing a grenade or currentWeapon will return it

Code Snippet
Plaintext
if ( isDefined( player.is_drinking ) && player.isDrinking ) )
- to check if player is drinking a perk, or again currentWeapon will return wrong

Add those and I think you are all good, but I swear im forgetting at least one more thing

Thank you Harry Bo21,

for helping me too  ;)  8)


Best regards,
Gamer9294
Title: Re: hintstring doesnt update
Post by: alaurenc9 on November 24, 2015, 02:54:30 pm
Code Snippet
Plaintext
if ( isDefined( player.is_drinking ) && player.isDrinking ) )

isDrinking -> is_drinking i assume? and don't forget to take that extra parentheses at the end out.

Title: Re: hintstring doesnt update
Post by: Harry Bo21 on November 25, 2015, 09:05:44 am
isDrinking -> is_drinking i assume? and don't forget to take that extra parentheses at the end out.
isDrinking() doesnt exist to my knowledge

Code Snippet
Plaintext
if ( isDefined( player.is_drinking ) && player.is_drinking )

should have been that