Jump to content

EquipItem/GetItemCount projectiles to inventory?


SoloManGames

Recommended Posts

Anyone know why I can't use EquipItem or GetItemCount with projectiles? I made grenades pickup-able through GECK and now I want to run a script that detects when the grenades are picked up. For some reason when I make a script to do this I get an error saying it is an invalid ObjectID:

 

scn SycPickupNades

begin GameMode
if Player.GetItemCount GrenadeFragProjectile > 0
	Player.EquipItem GrenadeFragProjectile 1 1
endif
end

 

My goal is to detect when the player picks up the grenade so I can immediately have him equip it. The mod is for being able to toss back grenades that are thrown at you.

Link to comment
Share on other sites

Here's an outline of what I've said in your thread on the official GECK forum, for anyone who's wondering the same thing:

You can't add projectiles to an inventory because they're not carryable forms like weapons are.

 

When you pick up a mine, the associated weapon is added to your inventory. This is hard-coded behaviour - projectiles with the "Can be Picked Up" flag set will, when activated by the player, add the weapon specified as their "Default Weapon Source" to the player's inventory.

Cipscis

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...