Ok, I got 1 level I haven't broke yet. Cut scene time.

Topics regarding Scripting with Reality Factory
Post Reply
User avatar
fps
Posts: 504
Joined: Mon Sep 26, 2005 9:54 pm
Location: in a magical land devoid of hope, happiness, and sanity.

Ok, I got 1 level I haven't broke yet. Cut scene time.

Post by fps »

Well its actually going to be more like an interactive conversation.
I need some help setting it up.
This will be my first cut scene.
(like loosing my innocence all over again :roll: except without the hospital visit... i hope :shock: )

ok.
well. I am going to start with a stationary pawn.
Simple, If you shoot him he dies. if you hit e he starts a conversation.
The camera goes to a certain position (the side) and the players actions are frozen.

the pawn is a security guard with blood running out of his arm. (spray effect)
He is sitting on the ground.
ok keeping it simple.

When you hit e.
Guard; I've been shot, will you help me?
option 1 = no = exits conversation and returns all to normal.

option 2 = yes = -1 medical kit (pawn gets + 50 health)
guard gets up and bleeding stops.
Guard; thanks. I'll follow you now.
Guard; can i have a weapon?

suboption1 = give assault rifle and ammo -1 m16gl -100 5.56
suboption2 = give pistol and ammo -1 baretta -100 9mmauto
suboption3 = give nothing but the best of luck

the sub options can be done a few different ways, i could spawn 1 of 3 pawns with diffrent scripts or it could be part of the same script. either way, im going to need the pawn to follow the player afterwards.
There's a simple script for this somewere.

Can someone walk me through setting this up. i really feel that the game needs ore interaction before i can release a demo. moe so then some of the other things I've been trying to fix latley.

Thanks,
fps
1 wrote:
for the internet is a cruel and dark place at times, and there's sex and blood everywhere.

2 wrote:
You say that like it's a bad thing.

1 wrote:
You are a bad thing.
User avatar
vrageprogrammer
Posts: 566
Joined: Wed Oct 31, 2007 2:59 pm
Location: On top of a tree
Contact:

Post by vrageprogrammer »

Cool!
Hope this comes out well!
It was not Possible to determine the dimensions of the image....
User avatar
fps
Posts: 504
Joined: Mon Sep 26, 2005 9:54 pm
Location: in a magical land devoid of hope, happiness, and sanity.

Post by fps »

http://www.youtube.com/watch?v=ltNGcFBkmTs
this is the video of what i have so far.
the script is based off of a light like the ones in the other videos, i need to fix the twitching problem first. i don't remember how though. its caused by starting the animation over every seccond, here is the script.

Code: Select all

{
	BOXWIDTH		[30]		// width and depth of bounding box
	HEALTHATTRIBUTE		[health]		// name of health attribute
	HEALTH				[5]	// initial amount of health
	DAMAGEATTRIBUTE		[health]	// attribute damaged by attack in pain

	
savetimer		[-1]
savehealth		[none]
savex			[none]
savey			[none]
savez			[none]
savestate		[none]
saveyaw			[0]
STATE			[0]
state			[0]
lasthp                  [0]
lastdamage              [0]

	// spawn pawn and do setup work

	Spawn[ ()
	{
		Console(false);
		BoxWidth(BOXWIDTH);			// set bounding box width/depth
		AddAttribute(HEALTHATTRIBUTE,-1000,HEALTH);
		SetAttribute(HEALTHATTRIBUTE,HEALTH);
		LowLevel("idle");
	} ]
        

	idle[ ()
	{
            
                Animate("cower_sitting_floor");
                self.ThinkTime = 0.1;
                check_damage();
		AddExplosion("cleanlight","Bip01 Head",0,10,0);
                return 0;
	} ]	

        check_damage[ ()
	{
        if(GetAttribute(HEALTHATTRIBUTE) < 1)
                {
			self.think = "Die";
			return 0;
                }
        return 0;
	} ]
        

	Die[ ()
	{
            	AnimateHold("crouch_diegutshot");
		PlaySound("pawn/standard/takedamage/chest.wav");
		PlaySound("pawn/teams/blackrock/security/ba_die2.wav");
		AddExplosion("electricalshort","Bip01 Head",0,0,0);
		self.think = "IdleDead";
	} ]

	// idle in place waiting for something to happen

	IdleDead[ ()
	{
                return 0;
	} ]	

}
1 wrote:
for the internet is a cruel and dark place at times, and there's sex and blood everywhere.

2 wrote:
You say that like it's a bad thing.

1 wrote:
You are a bad thing.
User avatar
fps
Posts: 504
Joined: Mon Sep 26, 2005 9:54 pm
Location: in a magical land devoid of hope, happiness, and sanity.

Post by fps »

ok WTF is up with this. any time i try to add effect and explosion... no matter what it is. when i run the game with it it crashes on the level load.
whats wrong with this???

[WoundDrip]
type = spray
bitmapname = blood.bmp
alphamapname = blood_a.bmp
angles = 360 360 360
colormax = 241 167 84
colormaxalpha = 255
colormin = 236 242 113
colorminalpha = 255
sourcevariance = 1
destvariance = 5
gravity = 0 -30 0
maxscale = .2
minscale = 0.1
maxspeed = 20
minspeed = 10
maxunitlife = 10
minunitlife = 8
particlecreationrate = .5
totallife = 20
bounce = true

;for wounded security guard
[WoundDrip]
effect0 = WoundDrip
delay0 = 0
offset0 = 0 0 0

Code: Select all

	Die[ ()
	{
            	AnimateHold("crouch_diegutshot");
		PlaySound("pawn/standard/takedamage/chest.wav");
		PlaySound("pawn/teams/blackrock/security/ba_die2.wav");
                AddExplosion("WoundDrip","Bip01 Head",0,0,0);
		self.think = "IdleDead";
	} ]

Initializing Game Shell...
--------------------------------------
--- Reality Factory 0.75C ---
--- For more Information, visit: ---
--- http://www.realityfactory.info ---
--------------------------------------

Parsed RealityFactory.ini file

Genesis3D Initialized

*INFO* VFS detected (not encrypted)...

Initializing Camera Manager...
Initializing User Input Subsystem...
Initializing Audio Manager Subsystem...
Initializing CD Audio Manager Subsystem...
Initializing Midi Audio Manager Subsystem...
Initializing RF Menu Manager Subsystem...
Initializing Network...
Loading Menu.ini...
Parsing Menu.ini...
Loading Character.ini...
Initializing Menu
Initializing Collision Manager Subsystem...
Initializing Network Manager Subsystem...
Initializing AVIFile Video Subsystem...
Launching Reality Factory Game Shell...
Entering CRFMenu::DoMenu()
Entering CRFMenu::ProcessMenu
Entering Windows Message Loop, Rendering Game Menu
Entering CRFMenu::ProcessMenu
Entering Windows Message Loop, Rendering Game Menu
Entering CRFMenu::ProcessMenu
Entering Windows Message Loop, Rendering Game Menu
oh Damn I'm a computer and can't think. arrrrrgghhh CRASH!!!!

why is this happening! why does this stuff never work for me. why is the sky blue. why is jonny depp a major queer but every girl i've ever talked to wants to screw him?
:roll:

ok, i need sleep. and drugs. but i'll just sleep. cause drugs r bad.
1 wrote:
for the internet is a cruel and dark place at times, and there's sex and blood everywhere.

2 wrote:
You say that like it's a bad thing.

1 wrote:
You are a bad thing.
User avatar
fps
Posts: 504
Joined: Mon Sep 26, 2005 9:54 pm
Location: in a magical land devoid of hope, happiness, and sanity.

Post by fps »

Ok, i figured out that sometimes i have to restart my computer to ge the level to run. 2 things i need help with.
i need to get the idle animation to play all the way through, i need to get my distance order working so i can start the convo.
here is what i have so far.

Code: Select all

{
	BOXWIDTH		[30]		// width and depth of bounding box
	HEALTHATTRIBUTE		[health]		// name of health attribute
	HEALTH				[5]	// initial amount of health
	DAMAGEATTRIBUTE		[health]	// attribute damaged by attack in pain

	
savetimer		[-1]
savehealth		[none]
savex			[none]
savey			[none]
savez			[none]
savestate		[none]
saveyaw			[0]
STATE			[0]
state			[0]
lasthp                  [0]
lastdamage              [0]

	// spawn pawn and do setup work

	Spawn[ ()
	{
		Console(false);
		BoxWidth(BOXWIDTH);			// set bounding box width/depth
		AddAttribute(HEALTHATTRIBUTE,-1000,HEALTH);
		SetAttribute(HEALTHATTRIBUTE,HEALTH);
		LowLevel("idle");
	} ]
        

	idle[ ()
	{
            
                Animate("cower_sitting_floor");
                self.ThinkTime = 0.1;
                check_damage();
                check_convo();
		AddExplosion("cleanlight","Bip01 Head",0,10,0);
                return 0;
	} ]	

        check_damage[ ()
	{
        if(GetAttribute(HEALTHATTRIBUTE) < 1)
                {
			self.think = "Die";
			return 0;
                }
        return 0;
	} ]
        
        check_convo[ ()
	{
        if(GetDistanceTo("Player")  < 10)
                {
			self.think = "Die";
			return 0;
                }
        return 0;
	} ]
        

	Die[ ()
	{
            	AnimateHold("crouch_diegutshot");
		PlaySound("pawn/standard/takedamage/chest.wav");
		PlaySound("pawn/teams/blackrock/security/ba_die2.wav");
		self.think = "IdleDead";
	} ]

	// idle in place waiting for something to happen

	IdleDead[ ()
	{
                return 0;
	} ]	

}
1 wrote:
for the internet is a cruel and dark place at times, and there's sex and blood everywhere.

2 wrote:
You say that like it's a bad thing.

1 wrote:
You are a bad thing.
Post Reply