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 / Tech script

Author
Message
Slayer_2
18
Years of Service
User Offline
Joined: 18th Sep 2006
Location: Anywhere I feel like
Posted: 20th Oct 2006 06:34 Edited at: 20th Oct 2006 17:59
Hi I was wondering if it is possible to make a tech script which gives the player ammo when you are near? I've tried using the plrtake action with no sucsess. here is the code so far;Artificial Intelligence Script

;Header

desc = Passive tech

;Triggers

:state=0:animate=1
:state=0,plrcanbeseen:settarget
:state=0,random=20:rotateheadrandom=65
:state=0,shotdamage=10:settarget,rotatetotarget,resethead
:state=0,noiseheard=5:rotateheadrandom=85
:state=0,plrdistwithin=50,plrtake/files/entitybank/scifi/items/tavor_ammo
;End of Script
please help me with this as I think a tech could be a good script to have in peoples projects.

Elite OPS Terrorstrike coming soon
Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 20th Oct 2006 18:17 Edited at: 20th Oct 2006 18:18
Why would you need this script at all if you can just put ammo there to pick up? Anyway...

You are using the plrtake all wrong (no path)... and it's playertake.
Have a look in the 'pickup' files in your scriptbank for examples.


You could use a trigger at the tech to do the AI for him, and assign the ammo in the IFUSED of the trigger.
(The alternative to the trigger is to add an IFUSED assignment to the character's FPE)
If you place the ammo in front of your Tech and set spawn at start to no, then it will appear when activated.


The Ammo is specific to the Gun being used as described in the ammo's fpe.
So, unless the player can only carry one type of gun, your Tech won't be much help.
The solution to that is give the player a weapon instead of ammo since it acts as ammo too.
That way it won't matter if he has a gun yet or not.


Don't forget to visit Conjured Entertainment
Slayer_2
18
Years of Service
User Offline
Joined: 18th Sep 2006
Location: Anywhere I feel like
Posted: 21st Oct 2006 04:49
well I guess that kinda helps but the idea of the tech is that he gives you ammo when you are near but only for one gun. anyhow thanks for helping.

Elite OPS Terrorstrike coming soon

Login to post a reply

Server time is: 2024-11-23 00:56:20
Your offset time is: 2024-11-23 00:56:20