Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

FPSC Classic Scripts / Interesting Crosshair Concept (Using PB)

Author
Message
darimc
17
Years of Service
User Offline
Joined: 19th Jan 2007
Location: Canada
Posted: 28th Dec 2010 05:09
This is just a quick idea that popped in my mind, but I know little to nothing about scripting, so it is just a suggestion. In PB, it is possible to display a HUD when aiming at an entity, right? Well, what if you displayed a regular crosshair but add some lines to a character's script so that when you are aiming at that enemy, it displays an image of that same crosshair, but in a different colour? This would be a cool effect to show when you are aiming at an enemy.

If anyone wants to try their hand at this, be my guest. I don't own PB, so I couldn't use it but other members might find it useful.

Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 28th Dec 2010 08:39
I don't believe it's possible to change the crosshair itself on the fly. But, you can hide the crosshair and display HUDs positioned in the center of the screen that LOOK like crosshairs. Then swap between them when aiming at certain entities.

Also, you could have it show a green crosshair when aiming at allies. And combined with weapon scripting (which, sadly, seems to be bugged right now) you could prevent a weapon from firing at allies.


The one and only,


Only those who sow the seeds of their desires will reap their benefits later.
However, I have seeds of my own to tend to. I don't have time to be someone else's watering can.
Lewis
VBOTB Developer '10
19
Years of Service
User Offline
Joined: 16th Mar 2005
Location: Queensland, Australia
Posted: 28th Dec 2010 12:29
I did the exact same thing in Alpha Project using the variable system and the pickobject=x feature in Project Blue.

Wolf
17
Years of Service
User Offline
Joined: 8th Nov 2007
Location: Luxemburg
Posted: 28th Dec 2010 12:54
So, it would be possible to add a little Text Hud showing "Machine Gunner" or "Sniper" or whatever if you aim at an enemie? Would look pretty cool.

Or even better, that way the player would be able to see the Name of NPC's like in RPG Games.



-Wolf

God Helps the Beast in Me!
Lewis
VBOTB Developer '10
19
Years of Service
User Offline
Joined: 16th Mar 2005
Location: Queensland, Australia
Posted: 28th Dec 2010 13:31
The concept I used is this:

If variable ch equals 1, set crosshair image to white
If variable ch equals 2, set crosshair image to green
If variable ch equals 3, set crosshair image to red
If variable ch equals 4, disable crosshair (handy for melee weapons)

using the pickobject command, you change the variable to whatever crosshair it is:

:state=0,pickobject=1:setvar=ch 1 (or something along those lines)

Using weapon scripts, you can even make the crosshair fade out and back in while reloading or down the sights.

Errant AI
18
Years of Service
User Offline
Joined: 24th Aug 2006
Location:
Posted: 29th Dec 2010 03:32
It's only to bad the pickobject radius can't be defined because it tends to be a little finicky about where you are pointing on a character. Usually it's in the centerline upper-chest to neck area on characters that pickobject=1 becomes true. So looking at limbs or the top of the head won't always trigger the condition.

Technically this is doable in stock FPSC now but without PB's hudfade function it can look a bit buggy because your huds can strobe. Pickobject works best with small entities, like switches or pickups, in my experience.
darimc
17
Years of Service
User Offline
Joined: 19th Jan 2007
Location: Canada
Posted: 29th Dec 2010 17:06
@Plystire, That's what I meant, I must have explained it too vaguely

@Everyone Else, Well it's interesting that some of you have realized this idea too. I may try to implement this in my next game if I end up using PB or PG.

Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 30th Dec 2010 03:09
@Wolf:

Using Lewis' setup, you can have a multitude of variable values, and have specific enemies trigger different values, to display their class alongside the crosshair (which would be cool!) such as "Sniper", "Machine Gunner", etc. with your examples.


@Errant:

Unfortunately, administering an epsilon to the equation (giving it a "wider than pinpoint" area of detection) would take far more processing. At least, the way I would implement it. I'm not the greatest when it comes to collision calculations.

I wasn't aware of it's finicky behavior regarding characters. I'm not sure what could be causing that, without blaming DBP itself, since the command relies heavily on DBP commands to determine whether you're aiming at an object or not.


The one and only,


Only those who sow the seeds of their desires will reap their benefits later.
However, I have seeds of my own to tend to. I don't have time to be someone else's watering can.
SecretiveOps
14
Years of Service
User Offline
Joined: 13th Sep 2010
Location:
Posted: 4th Jan 2011 22:29
Hold on... so you're saying that there is NO WAY in Project Blue that we could have this amazing idea? Maybe do the color change thing, thet would work, but the names would be better than the latter.

Why does life suck the life out of you?
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 5th Jan 2011 01:32
What?

When did I say that you couldn't do it? I've only been saying that you CAN do it.


The one and only,


Only those who sow the seeds of their desires will reap their benefits later.
However, I have seeds of my own to tend to. I don't have time to be someone else's watering can.

Login to post a reply

Server time is: 2024-11-24 14:50:29
Your offset time is: 2024-11-24 14:50:29