script

Topics regarding Scripting with Reality Factory
revolutiongames2004
Posts: 75
Joined: Tue Jul 05, 2005 4:29 pm

script

Post by revolutiongames2004 » Fri Jul 08, 2005 7:55 pm

CAN you tell me how to make a script where you must type everything exactly as programed like "lifegiver"

thanx much appretiated

revolutiongames2004
Posts: 75
Joined: Tue Jul 05, 2005 4:29 pm

Post by revolutiongames2004 » Fri Jul 08, 2005 11:30 pm

plez help

rgdyman
Posts: 84
Joined: Tue Jul 05, 2005 7:05 am

Post by rgdyman » Fri Jul 08, 2005 11:48 pm

"Sorry" but I never played that title.

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

( Door codes, access codes, )

revolutiongames2004
Posts: 75
Joined: Tue Jul 05, 2005 4:29 pm

Post by revolutiongames2004 » Sat Jul 09, 2005 5:14 am

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".

rgdyman
Posts: 84
Joined: Tue Jul 05, 2005 7:05 am

Post by rgdyman » Sat Jul 09, 2005 4:00 pm

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

revolutiongames2004
Posts: 75
Joined: Tue Jul 05, 2005 4:29 pm

Post by revolutiongames2004 » Sat Jul 09, 2005 4:12 pm

thanks a ton

rgdyman
Posts: 84
Joined: Tue Jul 05, 2005 7:05 am

Post by rgdyman » Sat Jul 09, 2005 4:23 pm

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.

revolutiongames2004
Posts: 75
Joined: Tue Jul 05, 2005 4:29 pm

Post by revolutiongames2004 » Sat Jul 09, 2005 4:27 pm

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.

User avatar
QuestOfDreams
Site Admin
Posts: 1520
Joined: Sun Jul 03, 2005 11:12 pm
Location: Austria
Contact:

Post by QuestOfDreams » Sat Jul 09, 2005 4:53 pm

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:

rgdyman
Posts: 84
Joined: Tue Jul 05, 2005 7:05 am

Post by rgdyman » Sat Jul 09, 2005 6:25 pm

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)

User avatar
QuestOfDreams
Site Admin
Posts: 1520
Joined: Sun Jul 03, 2005 11:12 pm
Location: Austria
Contact:

Post by QuestOfDreams » Sat Jul 09, 2005 6:34 pm

Dan Valeos panelcontrol script which I've posted here
viewtopic.php?t=15
shows how to use it

rgdyman
Posts: 84
Joined: Tue Jul 05, 2005 7:05 am

Post by rgdyman » Sat Jul 09, 2005 7:03 pm

Oops. I didn't realize that script was what I was looking for. Thanks!

It's all downhill now

rgdyman
Posts: 84
Joined: Tue Jul 05, 2005 7:05 am

Post by rgdyman » Sun Jul 10, 2005 2:06 am

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

GD1
Posts: 413
Joined: Tue Jul 05, 2005 2:33 pm

Post by GD1 » Sun Jul 10, 2005 4:33 am

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.

rgdyman
Posts: 84
Joined: Tue Jul 05, 2005 7:05 am

Post by rgdyman » Sun Jul 10, 2005 10:45 pm

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?

Post Reply