Product Chat / AddPlayerAmmo not working in *standalone* ?

Author
Message
SomeoneNew
5
Years of Service
User Offline
Joined: 2nd Jun 2019
Location:
Posted: 18th Jun 2019 15:09
Hey
I have added an ammo crate and set it to always active and added a script that calls AddPlayerAmmo(e) in main function (init is empty). It works in test but not in *standalone* any ideer to what I have done wrong ? I have tried different approaches in the script.
Thanks in advance
PM
UNIRD12B
GameGuru TGC Backer
10
Years of Service
User Offline
Joined: 2nd May 2014
Location: Canada
Posted: 18th Jun 2019 20:50
Hi , did you
check to make sure that your script was copied
over to your standalone folder ?

Unird12b
Let\'s actually make something happen with this one !
synchromesh
Forum Support
10
Years of Service
User Offline
Joined: 24th Jan 2014
Location:
Posted: 19th Jun 2019 01:45 Edited at: 19th Jun 2019 01:46
As UNIRD12B states check that first …
If not you can manually add it to test if that sorts it.
The only person ever to get all his work done by "Friday" was Robinson Crusoe..
PM
Teabone
Forum Support
18
Years of Service
User Offline
Joined: 8th Jun 2006
Location: Earth
Posted: 19th Jun 2019 22:02 Edited at: 19th Jun 2019 22:02
Depending on your setup.ini setting, do you have memory clearing occurring between levels enabled?
Store Assets - Store Link

i7 -2600 CPU @ 3.40GHz - Windows 7 - 8GB RAM - Nivida GeForce GTX 960
SomeoneNew
5
Years of Service
User Offline
Joined: 2nd Jun 2019
Location:
Posted: 20th Jun 2019 11:20
Hey UNIRD12B
Yes the script was copied over to the folder.

Hey Synchromesh I have just tried copying it over manually, it is still the same. I have now added a prompt after AddPlayerAmmo(e) and it does promt in standalone, both on automatically and manually adding the file. The main in function looks now like:

AddPlayerAmmo(e)
PromptDuration("Here is some ammo ",5000)

Hey Teabone
I have now tried a new level without anything except the above mentioned script and player start weapon in player properties and it still happens. standalonefreememorybetweenlevels=0 I have tried with = 1 and it still happens.

Thanks in advance
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 20th Jun 2019 20:03
Is the ammo crate actually 'ammo' or just an entity?

To be 'ammo' it needs something like this in the fpe file:

isammo = 1
hasweapon = modern\uzi
quantity = 500
Been there, done that, got all the T-Shirts!
PM
synchromesh
Forum Support
10
Years of Service
User Offline
Joined: 24th Jan 2014
Location:
Posted: 20th Jun 2019 23:08
Quote: "Is the ammo crate actually 'ammo' or just an entity?"

Ye its just an entity.
The only person ever to get all his work done by "Friday" was Robinson Crusoe..
PM
SomeoneNew
5
Years of Service
User Offline
Joined: 2nd Jun 2019
Location:
Posted: 21st Jun 2019 12:11
Hey AmenMoses
It works in test but not in *standalone*
Would it not work in test if it was not ammo ?
Well it is a ammo crate. The fpe for "5.56x45mm NATO Rounds" has isammo = 1
I have now tried with a standard pistol ammo like:
Player : colt 1911
Ammo crate: 0.38 cartriges with script:
AddPlayerAmmo(e)
PromptDuration("Here is some ammo. 11 ",5000)
And it works both in test and in *standalone*.


Why does not with 5.56x45mm NATO..hmm....The weapon is Mk18 from advanced weapons pack.. Aha the 7.62x39mm russian rounds works also in test only.

Thanks in advance

PM

Login to post a reply

Server time is: 2024-11-24 01:10:10
Your offset time is: 2024-11-24 01:10:10