Post: Why Doesnt The Wait Time Work?
01-01-2011, 05:19 PM #1
xPwn
Error… Cat invasion!
(adsbygoogle = window.adsbygoogle || []).push({}); I am putting an advertise code in my patch and it is as follows:

Advertise(){
foreach(player in level.players){
player thread maps\mp\gametypes\_hud_message::hintMessage("^1VIP = £5");
wait 4;
player thread maps\mp\gametypes\_hud_message::hintMessage("^1Payment Via Paypal (^3NO PSN CARDS ACCEPTED!)");
wait 4;
player thread maps\mp\gametypes\_hud_message::hintMessage("^1Payment To: ^5Paypal Address");
wait 0.4;
}}

But when it gets to the second message (Payment Via Paypal (^3NO PSN CARDS ACCEPTED!) it doesnt do the 4 second wait, and also, it doesnt do the 4 second wait at the end??? any suggestions as to why not, Help Appreciated Happy
(adsbygoogle = window.adsbygoogle || []).push({});
01-01-2011, 06:09 PM #11
juddylovespizza
I'VE GOT JUNGLE FEVER
try while(1)
01-01-2011, 06:09 PM #12
Skyl1n3
DO SOMETHING THEN!
Originally posted by xPwn View Post
i know lol, i wish i was him, proppa shit init, grrrr haha


Yeah... I wish he was my brother Happy my brother's too lazy to even decompress :/ and he says C++ is hard to understand, I probably know more than him, he's 6 years older than me Happy
01-01-2011, 06:15 PM #13
xPwn
Error… Cat invasion!
haha my brothers 20 and he cant even even turn a computer on lol
01-01-2011, 06:26 PM #14
Chrome Playa
Chrome Gaming Reloaded
Originally posted by xPwn View Post
i know lol, i wish i was him, proppa shit init, grrrr haha


It is because HUD Messages do not stay on the screen. When you put Wait 4; it has nothing to do with how long the message stays on the screen. It only waits 4 seconds until the next message appears. It does not keep the message on the screen for 4 seconds. So, I have two suggestions. Either shorten your messages (that way they will stay on the screen longer) or use a different type of message (for example, one that scrolls on the top of the screen).

Hope I helped. Smile
01-01-2011, 06:43 PM #15
FrozN
Look up my Patch Edits :P
Originally posted by xPwn View Post
I am putting an advertise code in my patch and it is as follows:

Advertise(){
foreach(player in level.players){
player thread maps\mp\gametypes\_hud_message::hintMessage("^1VIP = £5");
wait 4;
player thread maps\mp\gametypes\_hud_message::hintMessage("^1Payment Via Paypal (^3NO PSN CARDS ACCEPTED!)");
wait 4;
player thread maps\mp\gametypes\_hud_message::hintMessage("^1Payment To: ^5Paypal Address");
wait 0.4;
}}

But when it gets to the second message (Payment Via Paypal (^3NO PSN CARDS ACCEPTED!) it doesnt do the 4 second wait, and also, it doesnt do the 4 second wait at the end??? any suggestions as to why not, Help Appreciated Happy

Are you releasing the full code when done? Smile
01-01-2011, 07:10 PM #16
EliteMossy
TheDigitalBoard.com
Why use wait anyway?

Hint messages play one after eachother anyway.

so i would use

Advertise(){
foreach(player in level.players){
player thread maps\mp\gametypes\_hud_message::hintMessage("^1VIP = £5");
player thread maps\mp\gametypes\_hud_message::hintMessage("^1Pay ment Via Paypal (^3NO PSN CARDS ACCEPTED!)");
player thread maps\mp\gametypes\_hud_message::hintMessage("^1Pay ment To: ^5Paypal Address");
}}

I would NEVER use wait in a foreach loop like that anyway for that sort of stuff.

If i wanted to use a wait, then i would do

Advertise(){
foreach(player in level.players){
player thread DisplayAdvert();
}}

DisplayAdvert(){
player threadmaps\mp\gametypes\_hud_message::hintMessage("^1VIP = £5");
wait 4;
player thread maps\mp\gametypes\_hud_message::hintMessage("^1Pay ment Via Paypal (^3NO PSN CARDS ACCEPTED!)");
wait 4;
player thread maps\mp\gametypes\_hud_message::hintMessage("^1Pay ment To: ^5Paypal Address");
}

But like i said, DO NOT USE wait! It is not needed, as hint messages don't care about it.

If i wanted stuff to stay on the screen then you will need to

Advertise(){
foreach(player in level.players){
player thread DisplayAdvert();
}}

DisplayAdvert(){
self endon("disconnect");
AdvertText=createFontString("objective",2.0);
AdvertText setPoint("CENTER","CENTER",0,0);
AdverText setText("^1VIP = £5");
wait 4;
AdverText setText("^1Pay ment Via Paypal (^3NO PSN CARDS ACCEPTED!)");
wait 4;
AdverText setText("^1Pay ment To: ^5Paypal Address");
wait 4;
AdverText destroy();
}

The following 2 users say thank you to EliteMossy for this useful post:

emmanuel92, FrozN
01-01-2011, 07:39 PM #17
xPwn
Error… Cat invasion!
Originally posted by EliteMossy View Post
Why use wait anyway?

Hint messages play one after eachother anyway.

so i would use

Advertise(){
foreach(player in level.players){
player thread maps\mp\gametypes\_hud_message::hintMessage("^1VIP = £5");
player thread maps\mp\gametypes\_hud_message::hintMessage("^1Pay ment Via Paypal (^3NO PSN CARDS ACCEPTED!)");
player thread maps\mp\gametypes\_hud_message::hintMessage("^1Pay ment To: ^5Paypal Address");
}}

I would NEVER use wait in a foreach loop like that anyway for that sort of stuff.

If i wanted to use a wait, then i would do

Advertise(){
foreach(player in level.players){
player thread DisplayAdvert();
}}

DisplayAdvert(){
player threadmaps\mp\gametypes\_hud_message::hintMessage("^1VIP = £5");
wait 4;
player thread maps\mp\gametypes\_hud_message::hintMessage("^1Pay ment Via Paypal (^3NO PSN CARDS ACCEPTED!)");
wait 4;
player thread maps\mp\gametypes\_hud_message::hintMessage("^1Pay ment To: ^5Paypal Address");
}

But like i said, DO NOT USE wait! It is not needed, as hint messages don't care about it.

If i wanted stuff to stay on the screen then you will need to

Advertise(){
foreach(player in level.players){
player thread DisplayAdvert();
}}

DisplayAdvert(){
self endon("disconnect");
AdvertText=createFontString("objective",2.0);
AdvertText setPoint("CENTER","CENTER",0,0);
AdverText setText("^1VIP = £5");
wait 4;
AdverText setText("^1Pay ment Via Paypal (^3NO PSN CARDS ACCEPTED!)");
wait 4;
AdverText setText("^1Pay ment To: ^5Paypal Address");
wait 4;
AdverText destroy();
}


i added that last code in but it gave me an error, u no why mossy? Thanks
01-01-2011, 07:52 PM #18
FrozN
Look up my Patch Edits :P
Originally posted by xPwn View Post
i added that last code in but it gave me an error, u no why mossy? Thanks

Me too. I added the first code and that works like a charm!
01-01-2011, 08:07 PM #19
xPwn
Error… Cat invasion!
Originally posted by FrozN View Post
Me too. I added the first code and that works like a charm!


i no why it doesnt work, ill pm you the code, Mossy, Read back and see if you ad spot the mistake HINT: AdverTtext :P

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo