Frictional Games Forum (read-only)

Full Version: Carrying something in inventory [JENS - NEED HELP PLEASE]
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hi, i want to make it that you can pick up an entity in this case arabic_statue. And whenever you click on it in your inventory, it will drop it and you can move it around and be able to put it back in your inventory. Any idea how this can be scripted?
Well, if CreateEntityAtArea were to work on Player as an area, that would be possible, but it's not. So, only way to do is scripting, and having lots of areas.
Hmm, Know any simplier ways or should i ask jens?
I can't think of any simpler way since creating entities is bound to areas and areas cannot be created in run time.
Ill edit the title so jens can have a look at this.
If the user is to be able to take it out of their inventory and treat it as a normal grab entity, then i don't believe there is any practical sense in making it an inventory item in the first place. Also, if the user is capable of putting it back into their inventory, you would quickly realize there is no way to allow for this while allowing the user to hold it in their hand like any other grab entity. This is because the only way to prevent the item from entering the inventory again when attempting to grab the entity is to disable interaction. In which case, the entity would not be able to be carried anyway.

My suggestion is to forget about it being an inventory item and leave it as a grab entity, as there is no way to do what you want with HPL2. In HPL3 it would be possible, especially since you'd be allowed to have callbacks based on whether or not the user left-clicked or right-clicked on the item, and possibly even double-clicked or middle-clicked.
Well i dont want the player to carry this object around the entire map and he would be required to repick it back up before moving on.
I want to wait and see whats jens opinion on this.
(10-03-2011, 03:45 PM)Gamemakingdude Wrote: [ -> ]Well i dont want the player to carry this object around the entire map and he would be required to repick it back up before moving on.
I want to wait and see whats jens opinion on this.
Why can't you just have the player use the entity on something (you can mock up positioning with a deactivated ent + sticky area) - why do they need to be able to move it around?
I want it to speak to the player when it collidies with certain script areas.
(10-03-2011, 04:20 PM)Gamemakingdude Wrote: [ -> ]I want it to speak to the player when it collidies with certain script areas.
Do you want the player to drop the statue and carry it when he wants it to speak? If so, How does the player pick the statue back up again if he is carrying it?
Or do you want the player to "drop" the statue in specific spots (e.g on some kind of pedestal) when the statue can speak?
Pages: 1 2