scripted armor and other equiptment.

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.

scripted armor and other equiptment.

Post by fps »

In the game i am making i want to use a combination of armors that are already supported by the engine and scripted armors. basicly i have a selection of characters that can get different items.

First off I have different sets of helmets, kevlar body vests, scuba gear, and gasmask prefab sets for army, navy, police, swat, and black ops characters.
what I need to know is how to get the item to display on the character when active in the inventory and dissapear when used up. I don't know how to do this.

Seccondly I have special armors that when picked up automaticly snap to the character. the player throughout the last sections of the regular game collects the parts of a special "power suit" that gives added protection and functions, these parts need to be scripted because I don't want you to be able to put them away and because the suit is picked up as seperate parts (helmet, vest, ect...). Is it possible to script armor like this that works like the regular armors but is still scripted.

Also I am working on other special scripted gear items that activate special things in the game. I need some help with these too.

Tactical shield: my idea is that it is a solid pawn that snaps to the players skeleton when its picked up (with the use key), its solid so bullets that hit the shield don't hit the player at all. the problem is that I need it to change the animations the player uses (like the weapon overide 3rd person animations) and when you has it active (in hand) can only select certain weapon slots (pistols, smgs, knives, ect...). Also when its innactive but the player still has it i want it to snap to the players back (seperate model for innactive shield?).

Radio: the radio is just a scripted pawn that snaps to the players shoulder and when it gets within range of another specific pawn and it is on (turn on and off to save batteries) it goes to specific orders to play sounds. All I really need help with here is getting it to display on the players body when picked up (with the use key).

Night Vision Goggles: this is a hard one. Besides having an on and off state and being snaped to the player, it must also make the area around you visible without creating light... Is there a way to set the gamma higher and display a graphic infront of the players view so that it can be changed on and off?

If anyone can help me with any of this stuff that would be great.

Thanks,
Fps
User avatar
Juutis
Posts: 1511
Joined: Thu Jan 12, 2006 12:46 pm
Location: Finland

Post by Juutis »

Wow, you really have a LOT of things to do there. :D

I think that the best solution would be a scripted player. Trying to do something like this in some part-scripted style would cause a ridiculously great amount of work.

Nightvision: One way to do a night vision effect is to attach a dynamic light to player and have it go on/off and then use the script command FillScreenArea() to fill the whole screen with green color (or whatever color you want your night vision to be).
I have also used a very light green transparent overlay image to fill the screen. That way you don't need a light.
Pain is only psychological.
rgdyman
Posts: 84
Joined: Tue Jul 05, 2005 7:05 am

Post by rgdyman »

NightVision

How about a overlay ( color of ur choice) with a trigger.
( NIGHTVISTRIGG )

In the AI script when the trigg is on change material to the desired effect?

should look good
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 »

I would like to use a scripted player but I don’t have a script for one that allows for the level of functionality of even the 1st and 3rd person basic one. I am also trying to integrate the “Auto Target” and “thief 2 view” systems and I don’t know how to rewrite them to work with a completely scripted player. If you have a better scripted player script could try that. I think that I am going to need scripted items as such I mentioned to get them to show up in third person anyway so it might be easier for me to just script them as individual objects anyway.

I will try your night vision idea but I have a question about it. If the multiplayer ever gets fixed, will you be able to see another person’s night vision light?

I am not so great at scripting so what I really need is help making a base script for an item that…

Starts as a scripted pickup that is obtained though the use of the use key and dropped by clicking on its picture in the inventory (creating a new pickup “land mine system?”).

Then this object must change its actor to the 3rd person model (that I have already) and snap itself to the player’s skeleton.

Then it must come into the part of the script that I will change to tell the object what it is to do while attached to the player, turn on/off, have health, ect…

Then, with this base script I will be able to create the other objects.

If anybody is out there who can help me create this script or help me with anything else, you help would be greatly appreciated.

Thanks,
fps
User avatar
Juutis
Posts: 1511
Joined: Thu Jan 12, 2006 12:46 pm
Location: Finland

Post by Juutis »

If the multiplayer ever gets fixed, will you be able to see another person’s night vision light?
It depends on how flexible the multiplayer is. If every player must have exactly same level and have exactly same triggers on at the same time, I believe no. But if it allows you to turn on a trigger only on one computer, it would be possible to build some kind of system to prevent other people from seeing a certain light.

... That is, if you use a light. If you use only an overlay image without light you shouldn't have problems. :)
Pain is only psychological.
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 »

would an overlay by itself make objects in the dark more visible?
User avatar
Juutis
Posts: 1511
Joined: Thu Jan 12, 2006 12:46 pm
Location: Finland

Post by Juutis »

Well... yes and no. :D

A white (or any light coloured) overlay will make everything more lit up. However, if for example a wall has no light source, making it completely black, then the overlay has no effect on the wall. It will lighten up all the things that have even a tiny bit of light.

Here's some snapshots to make it clearer (at least I hope so).
In the lower one you can see that the areas with light are brighter but the dark places that have no light at all stay dark.
Attachments
snap2.jpg
Nighvision on
(33.83 KiB) Downloaded 124 times
snap1.jpg
Nightvision off
(35.39 KiB) Downloaded 130 times
Pain is only psychological.
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 »

what if the overlay was white?
I guess if i really needed to, I could create a dim flashlight effect that just lightened enough to see with the overlay on.
how did you set your overlay up?

Thanks,
fps


PS.
that is a nice HUD.
:)
User avatar
Juutis
Posts: 1511
Joined: Thu Jan 12, 2006 12:46 pm
Location: Finland

Post by Juutis »

Thanks... I guess.

That overlay is just a simple zoom overlay defined in the weapon.ini file. The goggles can't be done with this idea, however, at least not very easily.

If the overlay was white it would just make all things lighter. Just imagine those images with white instead of green.
Pain is only psychological.
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 »

how did you make the overlay transparent?


P.S. my hud is trash and half of it dosen't work.
User avatar
Juutis
Posts: 1511
Joined: Thu Jan 12, 2006 12:46 pm
Location: Finland

Post by Juutis »

Transparency can be achieved with a grey alphamap.
Pain is only psychological.
Post Reply