Promod scripting help
Moderator: Core Staff
-
- CJ G0D!
- Posts: 1575
- Joined: June 3rd, 2009, 9:02 pm
- Location: Cardiff University, UK
Re: Promod scripting help
I don't see why that isn't working. Possibly when the round resets so do the variables that you created, in which case I'm not sure of the way around that, although somebody will probably know. Maybe using pers[] which I've never understood.
Edit: I meant pers not pars
Edit: I meant pers not pars
Last edited by F |Madness| U on January 27th, 2013, 12:07 pm, edited 1 time in total.
-
-
- Core Staff
- Posts: 13313
- Joined: April 13th, 2005, 8:22 pm
- Location: UK, London
Re: Promod scripting help
Persistent stats should works.
self.pers["welcome"] = 1;
self.pers["welcome"] = 1;
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010
Re: Promod scripting help
I had no idea how to use that, but I did it in my first try
For anyone who doesn't know how that works
Thanks to both of you!
Oh and by the way, does anyone know how to create a hud, that writes a letter by letter and then letters randomly disappear (something like when it prints Defence or Attack when round starts)... It's not crucial or anything I just wonder if anyone knows
For anyone who doesn't know how that works
Code: Select all
if(!isDefined(self.pers["welcome"]))
{
    ...
    self.pers["welcome"] = 1;
}
Â
Oh and by the way, does anyone know how to create a hud, that writes a letter by letter and then letters randomly disappear (something like when it prints Defence or Attack when round starts)... It's not crucial or anything I just wonder if anyone knows
-
- CJ G0D!
- Posts: 1575
- Joined: June 3rd, 2009, 9:02 pm
- Location: Cardiff University, UK
Re: Promod scripting help
Well I think you can use the same script as IW used for writing the Attack/Defence, but simply change the string, although I can't remember what their method is exactly.
If you want to create the HUD element itself, then you would just create each letter as it's own element, and then letter1 destroy(); wait 0.5; letter2 destroy; etc.
Edit: Also Drofder if you see this, mind giving me a brief explanation on what the pers stats are/used for?
If you want to create the HUD element itself, then you would just create each letter as it's own element, and then letter1 destroy(); wait 0.5; letter2 destroy; etc.
Edit: Also Drofder if you see this, mind giving me a brief explanation on what the pers stats are/used for?
Last edited by F |Madness| U on January 27th, 2013, 1:54 pm, edited 1 time in total.
-
Re: Promod scripting help
Yeah I was thinking about using the same script, the problem is, I don't know where to find that and also there are sound effects when writing Attack/Defence, which would be missing if I'd do it myself...
Well thanks anyway but please note that I'm still looking for an answer
Well thanks anyway but please note that I'm still looking for an answer
-
- Core Staff
- Posts: 13313
- Joined: April 13th, 2005, 8:22 pm
- Location: UK, London
Re: Promod scripting help
Pers = PersistentF |Madness| U wrote:Edit: Also Drofder if you see this, mind giving me a brief explanation on what the pers stats are/used for?
They are variables that are persistent across rounds (not maps).
They are mostly used to store your ranks, score, deaths, weapons, loadouts, team, challenges, etc.
At the end of the map they are sent to your profile and at the beginning of the map they are recorded back to variables.
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010
-
- CJ G0D!
- Posts: 1575
- Joined: June 3rd, 2009, 9:02 pm
- Location: Cardiff University, UK
Re: Promod scripting help
Ah I see now, thanks.
I tried looking through some of the CoD4 scripts to see how the text is done, but couldn't find anything of use sorry. Also when I played some CoD4 to check, the only writing I noticed that disappears in the way you described (random letters disappear) is the writing that says Marine Force Recon/S.A.S/Spetsnaz/other when you spawn, and I couldn't find anything related to that in the scripts sorry!
I tried looking through some of the CoD4 scripts to see how the text is done, but couldn't find anything of use sorry. Also when I played some CoD4 to check, the only writing I noticed that disappears in the way you described (random letters disappear) is the writing that says Marine Force Recon/S.A.S/Spetsnaz/other when you spawn, and I couldn't find anything related to that in the scripts sorry!
-
Re: Promod scripting help
Don't worry, I will figure something out even without that it is better than nothing. And since we are talking about huds and stuff could you tell me which colors can I use in hud? I know (1, 1, 1) is white and (1, 0, 0) is red and few others, but as far as I know you could use all rgb colors. How I am supposed to know color codes?
Thanks in advance
Thanks in advance
-
- CJ G0D!
- Posts: 1575
- Joined: June 3rd, 2009, 9:02 pm
- Location: Cardiff University, UK
Re: Promod scripting help
Indeed. There are many websites where you can choose a colour from a palette and it will tell you the RGB of that colour.KillerSam wrote:google RGB colour codes?
-
Re: Promod scripting help
I'm still not sure how that works... e.g. (1, 1, 1) here is white but in real RGB 1, 1, 1 is black, and 255, 255, 255 is white. A brief explanation?
Oh and I figured out my previous question It's actually pulse effect
Thanks
Oh and I figured out my previous question It's actually pulse effect
Thanks
-
- Core Staff
- Posts: 2030
- Joined: July 24th, 2006, 11:21 am
- Location: Cramped in a small cubicle/making another jump map
Re: Promod scripting help
RGB values are normalized. You need to divide the original RGB by 255 to get the actual values used.I'm still not sure how that works... e.g. (1, 1, 1) here is white but in real RGB 1, 1, 1 is black, and 255, 255, 255 is white. A brief explanation?
Drofder2004: Drofder's rules for reviewing a map
[...]
#5 If your name is Rezil, minimum 5/5.
---
<LT>YosemiteSam[NL]:
I heard somewhere that the best way to start is juggling 2 balls with one hand, so you will get a feel for it.
[...]
#5 If your name is Rezil, minimum 5/5.
---
<LT>YosemiteSam[NL]:
I heard somewhere that the best way to start is juggling 2 balls with one hand, so you will get a feel for it.
Re: Promod scripting help
Now that makes sense! Thanks for that Rezil... And thanks to everyone else.
If i won't be needing any help, know that I'm very glad that you all helped me out! Especially F|Madness|U (Although none of your suggestions worked, you took time and you looked into that and answered each and every one of my questions ) Thanks again.
If i won't be needing any help, know that I'm very glad that you all helped me out! Especially F|Madness|U (Although none of your suggestions worked, you took time and you looked into that and answered each and every one of my questions ) Thanks again.
-
- CJ G0D!
- Posts: 1575
- Joined: June 3rd, 2009, 9:02 pm
- Location: Cardiff University, UK
Re: Promod scripting help
Good that you got your problems answered. Points for effort though, right?izak1996 wrote:Now that makes sense! Thanks for that Rezil... And thanks to everyone else.
If i won't be needing any help, know that I'm very glad that you all helped me out! Especially F|Madness|U (Although none of your suggestions worked, you took time and you looked into that and answered each and every one of my questions ) Thanks again.
-
-
- Core Staff
- Posts: 13313
- Joined: April 13th, 2005, 8:22 pm
- Location: UK, London
Re: Promod scripting help
If you want to do the CoD4 text (random lettering and shit)
you can do:
Automatic Message:
Manual Message:
you can do:
Automatic Message:
Code: Select all
self thread maps\mp\gametypes\_hud_message::hintMessage( "message" );
Code: Select all
hud = createFontString(font, size); /* font = default/objective and size has a min value of 1.4 (I think) */
hud.x = 0;
hud.y = 0;
hud.alignX = "center";
hud.alignY = "middle";
hud.alpha = 1;
hud.color = (0.6, 0.9, 0.6);
Â
hud setText("Message");
hud.glowColor = (0.2, 0.3, 0.7);
hud.glowAlpha = 1;
hud setPulseFX(value, (timeIn*1000), (timeOut*1000)); /*default for value is 100, defaults for timeIn and timeOut are 2-4 and 1 respectively */
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010
Who is online
Users browsing this forum: Semrush [Bot] and 37 guests