Frictional Games Forum (read-only)

Full Version: how to make floor break when u go to a certain area
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13
how to open chest with thalers
Thalers are, in short, a bitch to code.

(03-29-2013, 03:03 PM)Rapture Wrote: [ -> ]You can use the "chest_small" itself or put an Area around it...

You have a script called when grabbed and run a condition. If player has #thalers, do this, if not do else.

Now, if you only have one bag of Thalers in the map, you can do a simple Item comparison in the Inventory.

If you have multiple bags (Say the objective is to collect 50 Thalers to rent a room in a Hotel. And their are 10+ bags around, each with different amount of Thalers inside of each bag.) you would want to set a variable, initalized to 0.

Then simply add the amount of Thalers found each time it is picked up to the variable (The total amount of Thalers you have on yourself.) till you reach your goal.
(06-21-2014, 08:11 AM)victorkim890(KimmyChimmy) Wrote: [ -> ]how to open chest with thalers

Here you go Smile

PHP Code:
void OnStart()
{
    
AddUseItemCallback("""thalers""chest""OpenChest"true);
}

void OpenChest(string &in asItemstring &in asEntity)
{
if(
GetLocalVarInt("ChestVar") == 1)
{
    
SetLeverStuckState("chest"0false);
    
PlaySoundAtEntity("Unlock""unlock_door.snt""Player"0false);

Thalers are an item - rather like spending money or coins. Not an item that goes into your inventory. You can't do a UseItemCallback with them.
(06-21-2014, 09:08 AM)Romulator Wrote: [ -> ]Thalers are an item - rather like spending money or coins. Not an item that goes into your inventory. You can't do a UseItemCallback with them.

Hmmm, never used thalers before, so I didn't know that :/ Well I tried.

You can also change it in the model editor to make it as an item for the inventory to work.
the custom story that has this thing where u can use thalers for unlocking chest is http://www.moddb.com/mods/still-alive

i tried to look for how to unlock a chest with thalers in that custom story but it doesnt help
actually i dont need to no how to use thalers on chest. its too confusing
how do u do tat thing in the beginning of the campaign when the bridge is broken and u get a part of the bridge and put it in tat area and it snaps into place so u could exit the wine cellar
Use Sticky Areas. All you must do is put the name of the object you want to snap to the area, and it will attach when you take it close enough.
i figured it out Big GrinDDDDD
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13