SoloManGames Posted May 16, 2009 Share Posted May 16, 2009 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 More sharing options...
Deleted1084753User Posted May 16, 2009 Share Posted May 16, 2009 You don't equip the projectile, there's a weapon form for the grenade that the player equips (WeapGrenadeFrag in this case). Link to comment Share on other sites More sharing options...
Cipscis Posted May 16, 2009 Share Posted May 16, 2009 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.