• Please make sure you are familiar with the forum rules. You can find them here: https://forums.tripwireinteractive.com/index.php?threads/forum-rules.2334636/

Code Change the way things are picked up?

Ninjakitty

Grizzled Veteran
May 23, 2009
73
0
Could someone make some sort of trigger or something that makes it so instead of walking over things, you press use to pick them up? It'd have to be implemented into maps. But it'd be nice. That's one of the things I liked about LOTD. And accidentally picking up things that someone else might need is quite annoying.
 
But still. Perhaps, from a mappers point of view, they wanted to create a cabinet of weapons of some sort? The player would have to pick one up, throw it, then pick another up, just to get the one they want.

And what about for armor? Say someone is at like 97 armor, and they accidentally run over body armor when their team-mate has no armor at all? How do you propose they throw that? Same situation with ammo. Someone fires a few shots, and then hits an ammo crate when their buddy is low on ammo.
 
Upvote 0
OH! I wasn't thinking of that when I was tinkering with scripted triggers! Thanks. And I have ideas how to improve on it. Such as make it so only one person can pick it up. Just have to end the scripted event after the actor spawn. Thanks a bunch! I shoulda thought of something like that. >_<

Edit: It'd be easy enough to make this into a respawnable thing. Just have it do what it does, wait 30 seconds, spawn the static mesh, if that's possible. Then go to action 0.
 
Last edited:
Upvote 0
Okay, got it working now.

Code:
Begin Map
Begin Actor Class=ScriptedTrigger Name=ScriptedTrigger1
    Begin Object Class=Action_WAITFOREVENT Name=Action_WAITFOREVENT1
        ExternalEvent="bullpuppickuptrigger"
    End Object
    Actions(0)=Action_WAITFOREVENT'myLevel.Action_WAITFOREVENT1'
    Begin Object Class=ACTION_SpawnActor Name=ACTION_SpawnActor1
        ActorClass=Class'KFMod.BullpupPickup'
        ActorTag="Bullpuppickup1"
    End Object
    Actions(1)=ACTION_SpawnActor'myLevel.ACTION_SpawnActor1'
    Begin Object Class=Action_TRIGGEREVENT Name=Action_TRIGGEREVENT0
        Event="Bullpuppickupmover1"
    End Object
    Actions(2)=Action_TRIGGEREVENT'myLevel.Action_TRIGGEREVENT0'
    Begin Object Class=Action_WAITFORTIMER Name=Action_WAITFORTIMER0
        PauseTime=0.010000
    End Object
    Actions(3)=Action_WAITFORTIMER'myLevel.Action_WAITFORTIMER0'
    Begin Object Class=ACTION_DestroyActor Name=ACTION_DestroyActor1
        DestroyTag="Bullpuppickup1"
    End Object
    Actions(4)=ACTION_DestroyActor'myLevel.ACTION_DestroyActor1'
    Begin Object Class=ACTION_DestroyActor Name=ACTION_DestroyActor2
        DestroyTag="bullpupusetrigger"
    End Object
    Actions(5)=ACTION_DestroyActor'myLevel.ACTION_DestroyActor2'
    Level=LevelInfo'myLevel.LevelInfo0'
    Region=(Zone=LevelInfo'myLevel.LevelInfo0',iLeaf=31,ZoneNumber=1)
    Tag="ScriptedTrigger"
    PhysicsVolume=DefaultPhysicsVolume'myLevel.DefaultPhysicsVolume0'
    Location=(X=-427.612854,Y=-5740.013184,Z=-1799.000000)
    bSelected=True
End Actor
Begin Surface
End Surface
End Map

So, what it does, it waits for the event, then spawns the bullpup actor on top of the triggerer, moves the bullpup mesh, and then deletes the thing it spawned, had to add the deleting in because it would spawn two of 'em for some reason. And I made it destroy the trigger so it wouldn't show the message after it got spawned.
 
Upvote 0