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 / Have gun ? So shoot !

Author
Message
3Dmajid
16
Years of Service
User Offline
Joined: 16th Dec 2007
Location: IRAN / TEHRAN
Posted: 8th Jan 2008 10:51 Edited at: 8th Jan 2008 10:52
I need to this script and I want to see that is it possible in a FPSC game ?
Maybe You played the Hitman and see in it that when Hitman has a gun in his hand , If polices see himm , Then shoot him.
So Is there this script ? :
- If character see player and player have gun in his hand ... then character shoot to player and If player haven't gun is his hand , character doesn't shoot him and just look him.

The life is standby ... So decide for you'r target and then you'll see that you are arrived and get it.
Molten Ice
16
Years of Service
User Offline
Joined: 4th Jan 2008
Location:
Posted: 8th Jan 2008 12:04
umm... dude... try this... http://forum.thegamecreators.com/?m=forum_view&t=91846&b=23
3Dmajid
16
Years of Service
User Offline
Joined: 16th Dec 2007
Location: IRAN / TEHRAN
Posted: 8th Jan 2008 17:21
Oh ... thanks ... This script is a very smart soldier but i need to this :

- If player has gun in his hand then shoot , else don't shoot.

Thanks for that script.

The life is standby ... So decide for you'r target and then you'll see that you are arrived and get it.
Seth Black
FPSC Reloaded TGC Backer
19
Years of Service
User Offline
Joined: 22nd Feb 2005
Location: Pittsburgh, PA
Posted: 8th Jan 2008 18:34 Edited at: 8th Jan 2008 18:50
Quote: "- If player has gun in his hand then shoot , else don't shoot."


...no, unfortunately there is no way for the current engine to determine
if the player is presenting a weapon, or not.

I enjoy Hitman, a great deal, too. You've got good taste, 3Dmajid.

You're trying to work out the mechanics for your new
killer game, aren't you?

It just occurred to me that it might be possible to create a main script for entities, so that they only respond if a certain key (1-9) is pressed...the weapon being selected from inventory.

That'd probably only be something that could be scripted to happen once. I dunno...

Maybe trying it the other way...they ignore (don't see) the player only if the zero (0) key is pressed (which would disarm the player), is the way to go.

Let me play around. If something pops up, I'll call it to your attention.

Thanks,

Seth Black


Widow 13 - Coming Spring 2008
xplosys
18
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 8th Jan 2008 19:21 Edited at: 8th Jan 2008 19:21
Seth, I've used that method before. I had a safe zone in a level (it was a bar) where you had to holster your weapon at the door. The door only opened when you pressed 0. It worked ok, and you can script beyond that to make something happen if you press another weapon key, but I could not suppress the mouse wheel, which cycles through weapons.

Best.

Seth Black
FPSC Reloaded TGC Backer
19
Years of Service
User Offline
Joined: 22nd Feb 2005
Location: Pittsburgh, PA
Posted: 8th Jan 2008 20:34
...glad to know I was on the right track.

The mouse wheel issue did pop into my head...

Maybe the player only has the one special favorite weapon, that he/she uses as part of their modus operandi? There'd be no other weapons to cycle through.

Alternately, 3Dmajid could provide instruction that in addition to control info, informs the player that use of the mouse wheel can lead to an early demise.


Widow 13 - Coming Spring 2008
vorconan
18
Years of Service
User Offline
Joined: 4th Nov 2006
Location: Wales
Posted: 9th Jan 2008 00:27 Edited at: 9th Jan 2008 00:30
This is only a theory but there are 3rd party key/mouse disabling programs about, maybe if it was combined with the .exe it could allow your code to work.

That's one way that I thought of, but it's a lot of hassle and cancelling out the mousewheel completely was not my desire.

One other way I thought of was this :


My theory is that Lee has already put variables in FPSC, in the way of the activate commands, but despite all of this, the mousewheel function gets in the way.



Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 9th Jan 2008 18:50 Edited at: 9th Jan 2008 19:04
@ 3Dmajid

Which version of FPSC are you using?

Don't forget to visit Conjured Entertainment

3Dmajid
16
Years of Service
User Offline
Joined: 16th Dec 2007
Location: IRAN / TEHRAN
Posted: 9th Jan 2008 20:12
X9 1.07 upgrade , I haven't X10.

The life is standby ... So decide for you'r target and then you'll see that you are arrived and get it.
Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 9th Jan 2008 23:46 Edited at: 9th Jan 2008 23:51
As Seth said..."unfortunately there is no way for the current engine to determine if the player is presenting a weapon, or not."

The idea of the 1-9 activating and the 0 deactivating works, except for that mouse wheel.
Currently, there is no way to toggle that off. (that would make a nice feature for a future update though - *winks @ Lee*)
Having only one weapon doesn't work for a fix either, because the user can go from unequiped to equiped without detection.
Having one weapon does limit this "cheat" that the users would have, unless you disable it with an outside program as vorconan suggested, but I know of none off hand.

Anyway here is the script mentioned/linked-to above that has been modified.
Hitting 1 through 9 (equiping any weapon) causes them to start shooting.
Hitting 0 makes them stop attacking.

If you wanted them to continue attacking after they start even, if you unequip your weapon afterwards, then change the following line...

:scancodekeypressed=11:activate=0,state=0

to...

:scancodekeypressed=11:activate=0



Anyway, here is the
.

Hope it helps until the mouse wheel problem gets worked out.

Don't forget to visit Conjured Entertainment

Seth Black
FPSC Reloaded TGC Backer
19
Years of Service
User Offline
Joined: 22nd Feb 2005
Location: Pittsburgh, PA
Posted: 9th Jan 2008 23:54
...very nice.

Many thanks...


Widow 13 - Coming Spring 2008
Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 9th Jan 2008 23:57 Edited at: 10th Jan 2008 00:03
I prefer Fiber-Wire ... Hitman rocks                                                            

Don't forget to visit Conjured Entertainment

Snipesoul
17
Years of Service
User Offline
Joined: 29th Aug 2007
Location: Somewhere in New York...
Posted: 10th Jan 2008 02:39
Just one question: What does the raycast condition actually do? Thanks for the script BTW.

Snipe to Success
Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 10th Jan 2008 03:40 Edited at: 10th Jan 2008 03:41
Quote: "Raycast X Y : Is true when the raycast hits something in front from X to Y units"

That's what the PDF Manual says on page 86. (it's in the docs folder)

Don't forget to visit Conjured Entertainment

3Dmajid
16
Years of Service
User Offline
Joined: 16th Dec 2007
Location: IRAN / TEHRAN
Posted: 10th Jan 2008 07:46
Conjured Entertainment
Very Very thanks.
Its very nice ... you are a great scripter.

The life is standby ... So decide for you'r target and then you'll see that you are arrived and get it.

Login to post a reply

Server time is: 2024-11-27 21:34:44
Your offset time is: 2024-11-27 21:34:44