Page 1 of 3

script

Posted: Fri Jul 08, 2005 7:55 pm
by revolutiongames2004
CAN you tell me how to make a script where you must type everything exactly as programed like "lifegiver"

thanx much appretiated

Posted: Fri Jul 08, 2005 11:30 pm
by revolutiongames2004
plez help

Posted: Fri Jul 08, 2005 11:48 pm
by rgdyman
"Sorry" but I never played that title.

If you could, give a quick explanation of what you need.

( Door codes, access codes, )

Posted: Sat Jul 09, 2005 5:14 am
by revolutiongames2004
well i need it so that when the player types "lifegiver" they get infinate health. i need a script that can tell if the player types "lifegiver" in letter order. ya know like a cheat code.

it would also be nice if i could get the letters to display on the screen(the ones we typed".

Posted: Sat Jul 09, 2005 4:00 pm
by rgdyman
I think I could put together something like that.

Let me think about it and get a test going today.

I'll let ya know later today or on Sunday

Posted: Sat Jul 09, 2005 4:12 pm
by revolutiongames2004
thanks a ton

Posted: Sat Jul 09, 2005 4:23 pm
by rgdyman
K, I have the basis of the script down.

The hard part will be getting the "Walldecals" or the "HUD" to display
the letters ( numbers ) when the key is pressed.

I'm a little stuck on that part.

I'll need an idea how to get that done.

Wall decals would work, just need ALOT of them along with ALOT of triggers.

As for the HUD way to go, I havn't dove into that aspect of RF yet.

If you have an idea the way you would rather go let know.

Posted: Sat Jul 09, 2005 4:27 pm
by revolutiongames2004
yes the hud is a good idea, like the health bar it fills up and reveals a letter if it is correct. like it'll slide over a certain % in order to show a letter and all of the rest is invisable due to alphas.

Posted: Sat Jul 09, 2005 4:53 pm
by QuestOfDreams
the low level command

Code: Select all

DrawText(char *Text, int XPos, int YPos, float Alpha, int Font#, int R, int G, int B );  
// Draws the text Text at the screen position XPos, YPos using the font Font#.
might be useful here :wink:

Posted: Sat Jul 09, 2005 6:25 pm
by rgdyman
Hmmm. Yep, sounds very usefull :oops:

I personally never knew it was a command.

Could you give me a quick example how that command works?

I cant recompile the source ( if thats how I need to do it)

Posted: Sat Jul 09, 2005 6:34 pm
by QuestOfDreams
Dan Valeos panelcontrol script which I've posted here
viewtopic.php?t=15
shows how to use it

Posted: Sat Jul 09, 2005 7:03 pm
by rgdyman
Oops. I didn't realize that script was what I was looking for. Thanks!

It's all downhill now

Posted: Sun Jul 10, 2005 2:06 am
by rgdyman
This to be harder than I thought :roll:

I can get the Cheat code to work just fine.
I used the word "Life"

The problem is there isn't much of a mystery to it.
All the player has to do is randomly hit keys and the "Life"
will eventually come up.

I could easily include an else factor to restart The script,
Hence there's still not much of a mystery. Just will take a little to
figure out.

My question is;

How Can I return what key was pressed and then have that letter
appear?

if(self.key_pressed=Key_A)
{
DrawText("A",SLOT_1,POS_DOWN,255.0,FONT,255,255,255);
}
if(self.key_pressed=Key_B)
{
DrawText("B",SLOT_1,POS_DOWN,255.0,FONT,255,255,255);
}

This is way to long. The entire alphabet?
I hope I'm making sense of my dilema.
Thanks

Posted: Sun Jul 10, 2005 4:33 am
by GD1
sorry to go off topic, but we have a lot of new script commands like this and no docs for them. is there any way we could get a list of the new commands added since 071 into the docs? cause if no one knows its there its kinda pointless to have them.

i know the dev team have a lot of stuff on their plates right now, so i'm not trying to be unnappreciative, i just wanted to remind you guys.

Posted: Sun Jul 10, 2005 10:45 pm
by rgdyman
Got it.

It'll take a little time but as long as it works.

The script will have a scoring system in it called " T_S" ( Text_Score)

when the player hits "Enter" it will tally up the T_S and modify the
player's Text_Score attribute.

The score is the same as each letters defanition on the keyboard.

A will equal 26.

if the player types in "A" 2 times the T_S is now 26+26.
As of now I have 8 slots available.

Now..... the pawn in the Game is waiting for a triggerorder()
that will check the player Text_Score. and react accordingly.

Get it?

Like I said this will take a little time...
Does anyone out there want this script?