You can have characters spawn items that the player can take. For example, I have a character that "gives" a key to the player. In the script, I have the "activatedifused=1" and in the If Used field for the character I put the key entity name in that field, setting the key to not spawn at start and placing it where I want it to appear (which is on a table just in front of the player between player and character). The player then presses the designated key to "take" or "pickup" the key. The main thing is if you want the If Used field to be activated or spawned, then you need to also ensure the "activatedifused=1" appears in the script where you want it to.
Here is a script I made for one of my levels. It has a character named Lt. Holtby, who will brief the player and give him multiple items such as an MP40, pistol, ammo, and radio. I use it for interaction, and it may help you.
;Artificial Intelligence Script
;Header
desc = L01 Initial briefing with Lt Holtby
;Triggers
:state=0:hudreset,hudx=84,hudy=21,hudimagefine=languagebank\english\gamecore\NorthernFox\WW2_GU\Huds\ww2_gu_l01_initial_brief_001.png,hudname=l01_initial_brief_001,hudhide=1,hudmake=display
:state=0:hudreset,hudx=84,hudy=21,hudimagefine=languagebank\english\gamecore\NorthernFox\WW2_GU\Huds\ww2_gu_l01_initial_brief_002.png,hudname=l01_initial_brief_002,hudhide=1,hudmake=display
:state=0:hudreset,hudx=84,hudy=21,hudimagefine=languagebank\english\gamecore\NorthernFox\WW2_GU\Huds\ww2_gu_l01_initial_brief_003.png,hudname=l01_initial_brief_003,hudhide=1,hudmake=display
:state=0:hudreset,hudx=84,hudy=21,hudimagefine=languagebank\english\gamecore\NorthernFox\WW2_GU\Huds\ww2_gu_l01_initial_brief_004.png,hudname=l01_initial_brief_004,hudhide=1,hudmake=display
:state=0:hudreset,hudx=84,hudy=21,hudimagefine=languagebank\english\gamecore\NorthernFox\WW2_GU\Huds\ww2_gu_l01_initial_brief_005.png,hudname=l01_initial_brief_005,hudhide=1,hudmake=display
:state=0:hudreset,hudx=84,hudy=21,hudimagefine=languagebank\english\gamecore\NorthernFox\WW2_GU\Huds\ww2_gu_l01_initial_brief_006.png,hudname=l01_initial_brief_006,hudhide=1,hudmake=display
:state=0:hudreset,hudx=84,hudy=21,hudimagefine=languagebank\english\gamecore\NorthernFox\WW2_GU\Huds\ww2_gu_l01_initial_brief_007.png,hudname=l01_initial_brief_007,hudhide=1,hudmake=display
:state=0:hudreset,hudx=84,hudy=21,hudimagefine=languagebank\english\gamecore\NorthernFox\WW2_GU\Huds\ww2_gu_l01_initial_brief_008.png,hudname=l01_initial_brief_008,hudhide=1,hudmake=display
:state=0:hudreset,hudx=86.2,hudy=21,hudimagefine=languagebank\english\gamecore\NorthernFox\WW2_GU\Huds\ww2_gu_l01_initial_brief_009.png,hudname=l01_initial_brief_009,hudhide=1,hudmake=display
:state=0:hudreset,hudx=84,hudy=21,hudimagefine=languagebank\english\gamecore\NorthernFox\WW2_GU\Huds\ww2_gu_l01_initial_brief_010.png,hudname=l01_initial_brief_010,hudhide=1,hudmake=display
:state=0:hudreset,hudx=86.2,hudy=21,hudimagefine=languagebank\english\gamecore\NorthernFox\WW2_GU\Huds\ww2_gu_l01_initial_brief_011.png,hudname=l01_initial_brief_011,hudhide=1,hudmake=display
:state=0:hudreset,hudx=84,hudy=21,hudimagefine=languagebank\english\gamecore\NorthernFox\WW2_GU\Huds\ww2_gu_l01_initial_brief_012.png,hudname=l01_initial_brief_012,hudhide=1,hudmake=display
:state=0:hudreset,hudx=86.2,hudy=21,hudimagefine=languagebank\english\gamecore\NorthernFox\WW2_GU\Huds\ww2_gu_l01_initial_brief_013.png,hudname=l01_initial_brief_013,hudhide=1,hudmake=display
:state=0:hudreset,hudx=84,hudy=21,hudimagefine=languagebank\english\gamecore\NorthernFox\WW2_GU\Huds\ww2_gu_l01_initial_brief_014.png,hudname=l01_initial_brief_014,hudhide=1,hudmake=display
:state=0:hudreset,hudx=86.2,hudy=21,hudimagefine=languagebank\english\gamecore\NorthernFox\WW2_GU\Huds\ww2_gu_l01_initial_brief_015.png,hudname=l01_initial_brief_015,hudhide=1,hudmake=display
:state=0:hudreset,hudx=84,hudy=21,hudimagefine=languagebank\english\gamecore\NorthernFox\WW2_GU\Huds\ww2_gu_l01_initial_brief_016.png,hudname=l01_initial_brief_016,hudhide=1,hudmake=display
:state=0:hudreset,hudx=84,hudy=21,hudimagefine=languagebank\english\gamecore\NorthernFox\WW2_GU\Huds\ww2_gu_l01_initial_brief_017.png,hudname=l01_initial_brief_017,hudhide=1,hudmake=display
:state=0:hudreset,hudx=84,hudy=21,hudimagefine=languagebank\english\gamecore\NorthernFox\WW2_GU\Huds\ww2_gu_l01_initial_brief_018.png,hudname=l01_initial_brief_018,hudhide=1,hudmake=display
:state=0:hudreset,hudx=84,hudy=21,hudimagefine=languagebank\english\gamecore\NorthernFox\WW2_GU\Huds\ww2_gu_l01_initial_brief_019.png,hudname=l01_initial_brief_019,hudhide=1,hudmake=display
:state=0:hudreset,hudx=86.2,hudy=21,hudimagefine=languagebank\english\gamecore\NorthernFox\WW2_GU\Huds\ww2_gu_l01_initial_brief_020.png,hudname=l01_initial_brief_020,hudhide=1,hudmake=display
:state=0:hudreset,hudx=84,hudy=21,hudimagefine=languagebank\english\gamecore\NorthernFox\WW2_GU\Huds\ww2_gu_l01_initial_brief_021.png,hudname=l01_initial_brief_021,hudhide=1,hudmake=display
:state=0:hudreset,hudx=84,hudy=21,hudimagefine=languagebank\english\gamecore\NorthernFox\WW2_GU\Huds\ww2_gu_l01_initial_brief_022.png,hudname=l01_initial_brief_022,hudhide=1,hudmake=display
:state=0:hudreset,hudx=84,hudy=21,hudimagefine=languagebank\english\gamecore\NorthernFox\WW2_GU\Huds\ww2_gu_l01_initial_brief_023.png,hudname=l01_initial_brief_023,hudhide=1,hudmake=display
:state=0:hudreset,hudx=12,hudy=15,hudimagefine=languagebank\english\gamecore\NorthernFox\WW2_GU\Huds\ww2_gu_io_completed.png,hudname=l01io01_completed,hudhide=1,hudmake=display
:state=0:hudreset,hudx=50,hudy=60,hudimagefine=languagebank\english\gamecore\NorthernFox\WW2_GU\Huds\ww2_gu_l01_backpack_00.png,hudname=l01_plr_backpack_00,hudhide=1,hudmake=display
:state=0:state=1
:state=1:state=3
:state=3,plrdistwithin=60:state=4
;BRIEFING START
:state=4:globalvar=3,decvar=1
:state=4:state=5
:state=5:plrfreeze=300000,rotatetoplr,state=6
:state=6:hudshow=l01_initial_brief_001,etimerstart,state=7
:state=7,etimergreater=150,scancodekeypressed=28:rotateheadrandom=65,hudunshow=l01_initial_brief_001,state=8
:state=8:hudshow=l01_initial_brief_002,etimerstart,state=9
:state=9,etimergreater=150,scancodekeypressed=28:rotateheadrandom=40,hudunshow=l01_initial_brief_002,state=10
:state=10:hudshow=l01_initial_brief_003,etimerstart,state=11
:state=11,etimergreater=150,scancodekeypressed=28:rotateheadrandom=20,hudunshow=l01_initial_brief_003,state=12
:state=12:hudshow=l01_initial_brief_004,etimerstart,state=13
:state=13,etimergreater=150,scancodekeypressed=28:rotateheadrandom=65,hudunshow=l01_initial_brief_004,state=14
:state=14:hudshow=l01_initial_brief_005,etimerstart,state=15
:state=15,etimergreater=150,scancodekeypressed=28:rotateheadrandom=40,hudunshow=l01_initial_brief_005,state=16
:state=16:hudshow=l01_initial_brief_006,etimerstart,state=17
:state=17,etimergreater=150,scancodekeypressed=28:rotateheadrandom=20,hudunshow=l01_initial_brief_006,state=18
:state=18:hudshow=l01_initial_brief_007,etimerstart,state=19
:state=19,etimergreater=150,scancodekeypressed=28:rotateheadrandom=65,hudunshow=l01_initial_brief_007,state=20
;ACTIVATE PLR MP40
:state=20:hudshow=l01_initial_brief_008,etimerstart,state=21
:state=21,etimergreater=150,scancodekeypressed=28:rotateheadrandom=40,hudunshow=l01_initial_brief_008,state=22
:state=22:settargetname=l01_plr_mp40,activatetarget=1,etimerstart,state=23
:state=23,etimergreater=200:state=24
:state=24:hudshow=l01_initial_brief_009,etimerstart,state=25
:state=25,etimergreater=150,scancodekeypressed=20:rotateheadrandom=20,hudunshow=l01_initial_brief_009,state=26
:state=26:etimerstart,state=27
:state=27,etimergreater=2000:hideplrweapon,state=28
;ACTIVATE MP40 AMMO
:state=28:hudshow=l01_initial_brief_010,etimerstart,state=29
:state=29,etimergreater=150,scancodekeypressed=28:rotateheadrandom=65,hudunshow=l01_initial_brief_010,state=30
:state=30:settargetname=l01_plr_mp40ammo,activatetarget=1,etimerstart,state=31
:state=31,etimergreater=200:state=32
:state=32:hudshow=l01_initial_brief_011,etimerstart,state=33
:state=33,etimergreater=150,scancodekeypressed=20:rotateheadrandom=40,hudunshow=l01_initial_brief_011,state=34
:state=34:etimerstart,state=35
:state=35,etimergreater=500:state=36
;ACTIVATE PISTOL
:state=36:hudshow=l01_initial_brief_012,etimerstart,state=37
:state=37,etimergreater=150,scancodekeypressed=28:rotateheadrandom=65,hudunshow=l01_initial_brief_012,state=38
:state=38:settargetname=l01_plr_pistol,activatetarget=1,etimerstart,state=39
:state=39,etimergreater=200:state=40
:state=40:hudshow=l01_initial_brief_013,etimerstart,state=41
:state=41,etimergreater=150,scancodekeypressed=20:rotateheadrandom=40,hudunshow=l01_initial_brief_013,state=42
:state=42:etimerstart,state=43
:state=43,etimergreater=500:hideplrweapon,state=44
;ACTIVATE PISTOL AMMO
:state=44:hudshow=l01_initial_brief_014,etimerstart,state=45
:state=45,etimergreater=150,scancodekeypressed=28:rotateheadrandom=65,hudunshow=l01_initial_brief_014,state=46
:state=46:settargetname=l01_plr_pistolammo,activatetarget=1,etimerstart,state=47
:state=47,etimergreater=200:state=48
:state=48:hudshow=l01_initial_brief_015,etimerstart,state=49
:state=49,etimergreater=150,scancodekeypressed=20:rotateheadrandom=40,hudunshow=l01_initial_brief_015,state=50
:state=50:etimerstart,state=51
:state=51,etimergreater=500:state=52
;BRIEFING PART 2- SHOWING INVENTORY HUD
:state=52:hudshow=l01_initial_brief_016,etimerstart,state=53
:state=53,etimergreater=150,scancodekeypressed=28:rotateheadrandom=65,hudunshow=l01_initial_brief_016,state=54
:state=54:hudshow=l01_plr_backpack_00,etimerstart,state=55
:state=55,etimergreater=250,scancodekeypressed=45:hudunshow=l01_plr_backpack_00,state=56
:state=56:hudshow=l01_initial_brief_017,etimerstart,state=57
:state=57,etimergreater=150,scancodekeypressed=28:rotateheadrandom=20,hudunshow=l01_initial_brief_017,state=58
:state=58:hudshow=l01_initial_brief_018,etimerstart,state=59
:state=59,etimergreater=150,scancodekeypressed=28:rotateheadrandom=40,hudunshow=l01_initial_brief_018,state=60
;ACTIVATE RADIO
:state=60:hudshow=l01_initial_brief_019,etimerstart,state=61
:state=61,etimergreater=150,scancodekeypressed=28:rotateheadrandom=65,hudunshow=l01_initial_brief_019,state=62
:state=62:settargetname=l01_plr_radio,activatetarget=1,etimerstart,state=63
:state=63,etimergreater=200:state=64
:state=64:hudshow=l01_initial_brief_020,etimerstart,state=65
:state=65,etimergreater=150,scancodekeypressed=20:rotateheadrandom=40,hudunshow=l01_initial_brief_020,state=66
:state=66:etimerstart,state=67
:state=67,etimergreater=500:state=68
;BRIEFING FINAL
:state=68:hudshow=l01_initial_brief_021,etimerstart,state=69
:state=69,etimergreater=150,scancodekeypressed=28:rotateheadrandom=20,hudunshow=l01_initial_brief_021,state=70
:state=70:hudshow=l01_initial_brief_022,etimerstart,state=71
:state=71,etimergreater=150,scancodekeypressed=28:rotateheadrandom=40,hudunshow=l01_initial_brief_022,state=72
:state=72:hudshow=l01_initial_brief_023,etimerstart,state=73
:state=73,etimergreater=150,scancodekeypressed=28:rotateheadrandom=60,hudunshow=l01_initial_brief_023,etimerstart,state=74
;END BRIEFING, ACTIVATE INITKEYS
:state=74,etimergreater=250:plrfreeze=0,state=75
:state=75:hudshow=l01io01_completed,hudfadeout=l01io01_completed,globalvar=1,incvar=1,state=76
:state=76:globalvar=7,incvar=1,rotateheadrandom=65,state=77
:state=77:rotateheadrandom=25,etimerstart,state=78
:state=78,etimergreater=2000:state=79
:state=79:rotateheadrandom=45,state=80
:state=80:globalvar=3,incvar=1
:state=80:settargetname=L01_Cpl_Shaw,activatetarget=1,state=81
:state=81,plrdistfurther=70:state=82
:state=82:settargetname=L01_Cpl_Maxwell,activatetarget=1,state=83
:state=83:rotateheadrandom=25,etimerstart,state=84
:state=84,etimergreater=2000:state=85
:state=85:rotateheadrandom=45,state=83
;End of Script
Not to try and confuse you, but this is how you can assign one script to spawn multiple items for the player to pickup. You can disregard the commands "globalvar, decvar" as I am using the variables for inventory and such.
Here is the sequence of events for the script:
1. Player approaches Lt. Holtby; when player is within distance of 60, he/she are frozen in place.
2. Briefing starts with a sequence of huds.
3. Player is given the MP40.
4. Player is given the ammo for the MP40.
5. Player given pistol and ammo.
6. Player shown their inventory items.
7. Player given the radio.
8. Briefing ends, player is unfrozen and continues on his/her way.
Now look at this section ";ACTIVATE PLR MP40" and look at this line in the script:
:state=22:settargetname=l01_plr_mp40,activatetarget=1,etimerstart,state=23
What happens is that the character on this line sets the target to be the MP40 (settargetname=l01_plr_mp40), which is on the level and the Spawn at Start is set to No. When the character activates that target, the MP40 says "I've been activated" and it spawns. It works the exact same as if I had a trigger that had the MP40 in the IfUsed field and the item was spawned when the player entered the trigger zone. I do it again later with the pistol, ammo, and radio using the same commands "settargetname=item" and then "activatetarget=1" to spawn that target item.
The main thing to look at is how one script assigned to a character can "settargetname=x" to the particular item, and "activatetarget=1" to spawn that item. The items all have their Spawn at Start set to No and are placed on the map where I want them to appear. The player presses a designated key to "pickup" or "take" the item(s).
Hope this does not confuse you, but this method is how you can have multiple items spawned by one script without having to have trigger zones populating your map. I could assign this to a computer console entity, character, crate, etc. Feel free to use it, modify it, rip it apart and alter for your needs.
Twitter: @NFoxMedia