Customized pickup items

Lithtech 2.1 / 2.2

Post Reply
User avatar
Spawn
Admin
Admin
Posts: 1310
Joined: Sun Jul 25, 2004 12:50 am
Location: Norway
Contact:

Customized pickup items

Post by Spawn » Mon Aug 09, 2021 9:30 pm

So.. the reason for this project is a map in progress from one of our finest mappers. The problem with a weapon item is that you cannot scale the size of it. But in this case it would be really cool if the sunglasses were really large. And of course function like a weapon pickup as well

Image

1. Replacing the Weaponitem with a Prop item

A Prop item will load pretty much any abc model and is often used to load many decoration object you see in the level such as lamps, cars, plants and ofcourse goats and monkeys. So it will also load a weapon model such as the camera/sunglasses. Place your marker and right click and add object->Prop

Image

when the Prop item is added, go to its properties.

Image
1. DamageProperties, Click the 0 to open a Damage Properties window.

Image
Make sure that NeverDestroy is set to True
then hit OK

It would be a shame if you could shoot or blow up the sunglasses, because that would destroy the prop and you will not get it back :evil2:

2. filename, This is where you select the model you want to use . Click the little B to browse for it. In this case we want the camera/sunglasses model which is located in GUNS\MODELS_HH\SUNGLASSES_HH.ABC
3. Skin, This is where you select the texture you want to use for the model. Click the little B to browse for it. and ofcourse the matching texture is GUNS\MODELS_HH\SUNGLASSES_HH.DTX

4. You can scale the size of the model by clicking the ... after Scale. Then this little window will appear.

Image

The default value here would be 1.0 1.0 1.0 which is the actual size of the model. Lets make it 7 times bigger by typing in 7.0 7.0 7.0

5. Make sure that solid is set to False

6. And last, I chose to show high detail in the DetailLevel at the bottom.

Yay, you have a set of gigantic sunglasses that you can run right trough.. (without getting them)

I guess you want to be able to pick them up as a you would with the normal weaponitem, so that will be the next step.

2. Add a triggable area and a respawn trigger

Put the green crosshair in center the Prop at ground level and add a Trigger object.
Image

Name the first one:
pickup_trigger0

Then move the crosshair a little and add a second 'Trigger' object and name that one
respawn_trigger0

3. Pickup Trigger

Image

1. I named this on pickup_trigger because this will actually give you sunglasses when running over it.
2. Dimms, click the ... and a second vector edit window will appear, this functions the same way as the scale window. This is the size of the triggable area, type in: 16.0 16.0 16.0
3. NumberOfActivations is set to 1 by default, this means that the trigger will only work 1 time and then die. Setting it to 0 will make trigger a infinite number of times.
4. TriggerDelay should be set to 1.000 which means that it will wait 1 second before it can trigger again.
5. Targets, press the 0 to bing up the targets window where you specify what the trigger should do.
Image

The first thing you want to do is to send a message to is the Prop0 object and tell it to disappear when the trigger is activated. So TargetName1 is Prop0. The message you want to send it is hidden 1 to hide it. Like this:

TargetName1 = Prop0
MessageName1 = hidden 1


Next is TargetName2 where you type in the name of the other trigger: respawn_trigger0 and give it the message trigger. This will start the second respawn trigger.

TargetName2 = respawn_trigger0
MessageName = trigger


And you don't want the pickup trigger to be able to give you sunglasses when the prop is hidden, so TargetName3 should be pickup_trigger0 and the message should be lock

TargetName3 = pickup_trigger0
MessageName3 = lock


Let's hit OK

6. TriggerTouch, if you hover this it will say that it is not supported by Nolf, but that is a lie.. It most certainly works. Set it to True.
7. MessageTouch, this is where you actually get the sunglasses. type in the message: AcquireWeapon sunglasses;
8. PlayerTriggerable should be set to True
9. ActivationSound, this is where I chose to add the pickup weapon sound located in POWERUPS\SND\PU_WEAPON.WAV.

4. Respawn trigger

So.. still awake? Just need to configure the last trigger now. Select respawn_trigger0 and go to Properties.
Image
1. Name, Make sure that it's name is respawn_trigger0
2. NumberOfActivations is set to 1 by default, this means that the trigger will only work 1 time and then die. Setting it to 0 will make trigger a infinite number of times.
3. SendDelay, this is a keyword on this trigger and where you set your respawn timer. I set this one to 10 seconds. It will be activated when the other trigger starts, but it will wait until this value is reached before it starts.
4. Targets, click the 0 to set that targets.

Image

Now you want to reverse what the previous trigger did. so we'll start with:
Targetname1 = Prop0
MessageName1 = hidden 0


This will make the sunglasses reappear.
Next you would want to unlock the first trigger again so that you can pick up the sunglasses.

TargetName2 = pickup_trigger0
MessageName2 = unlock


Then hit OK

5. ActivationSound, this is the sound that is played when the sunglasses reappear/respawn. I just used the standard weapon respawn sound: POWERUPS\SND\RESPAWN.WAV

And that's it.. You should now have a pair of ridiculously large sunglasses that works similar to the original weapon item. :insane:
You do not have the required permissions to view the files attached to this post.
Image

User avatar
Legbat
Pegasus Modteam
Pegasus Modteam
Posts: 149
Joined: Thu Oct 14, 2004 4:29 pm
Location: North Carolina, USA
Contact:

Re: Messing around with props

Post by Legbat » Tue Aug 10, 2021 4:26 am

Thanks for the help, Spawn! Works like a charm :thumb:
Image

Post Reply
jedwabna poszewka 50x60