KyleFan Posted June 30, 2022 Share Posted June 30, 2022 The post is edited! My original problem has been resolved. I have another question though at the end below the "EDIT" line. Hi everyone! I'm experimenting with entity modding (I just discovered it recently). There is a one-map mod for Outcast where Kyle goes to Kessel to rescue the imprisoned Lando. When you find Lando, there's no cutscene, no dialogue. You just deactivate the forcefield and Lando starts following you. I wanted to make some interaction between them, to have some dialogue from the existing voice files, but not the same as in the original ns_hideout mission. I edited the voice files, I wrote the script, now the only thing left is to add the script and its trigger to the map with entity modding. But I can't seem to make it work. Now, I'll have to go into more detail about what I was trying to do. I looked through the map's entities. So at the beginning of the level, seeing the first stormies Kyle comments on "What's the Remnant doing here?" This is its corresponding entries in the entity list: { "model" "*1" "classname" "trigger_once" "spawnflags" "1" "target" "t145" } { "classname" "target_scriptrunner" "origin" "-1576 -1660 492" "Usescript" "kessel/kyle_conv1" "targetname" "t145" } First, I thought, okay, let's try this: { "model" "*166" -> the last number here in the list was *165 "classname" "trigger_once" "spawnflags" "1" "target" "t190" -> that was just a random number that wasn't used elsewhere } { "classname" "target_scriptrunner" "origin" "2386 795 -550" -> that's in front of Lando's cell "Usescript" "kessel/kyle_lando" -> this is my script for their dialogue "targetname" "t190" } After I was done and I put the modded .bsp where it belongs, I tried to load the map and I got this error: "cm_inlinemodel: bad number" I figured that maybe I can't give a higher number in the "model" line than *165. For experiment, I changed it to *1 to see what happens. What happened was that it triggered both scripts, Kyle was commenting on the stormies then started saying his lines for Lando (though Lando is on the other side of the map at this point). So I concluded that I need to make this work without adding a new "model" number. There is a short cutscene on the level. After you kill off 5 imperials in a control room, that triggers the cutscene which shows Lando's cell in the prison block while Kyle says the line: "Lando! What are you doing here?" I didn't like this cutscene, though. It would have been better if Kyle pressed a console which shows a camera view. I thought I can get rid of that cutscene in favor of mine. But it's not that easy. The script for this cutscene contains some "use" commands which spawn Lando and some Imperials into the prison block, so I can't just get rid of the script. However, I deleted everything else that referred to the cutscene itself, the camera commands and the voice line from Kyle. The entries for this cutscene in the entity list were the following: { "target" "t125" "count" "5" "targetname" "control_cin" -> these are the 5 Imperials in the control room "origin" "1792 1248 -416" "classname" "target_counter" } { "Usescript" "kessel/cinematic_prison" -> the script for the cutscene, but now it only spawns in the npcs in the prison block "targetname" "t125" "origin" "1792 1216 -416" "classname" "target_scriptrunner" } My idea was to change the script's targetname to "t145" so the npcs will spawn in when Kyle is commenting on the stormies. This work just fine. The next thing I did was: { "target" "t125" "count" "7" -> the number of Imperials in the prison block "targetname" "prisonguards" -> changed the targetname to these guys "origin" "2386 765 -550" "classname" "target_counter" } { "classname" "target_scriptrunner" "origin" "2386 795 -550" "Usescript" "kessel/kyle_lando" "targetname" "t125" } My plan was that nothing will be triggered when I kill the Imps in the control room, instead, after I kill the Imps in the prison block, it will trigger the dialogue between Lando and Kyle. But nothing happens. I tried out several minor changes but none of them worked. I'm kinda stuck. Is there a way that I can make this work? I can imagine there's a very simple solution to this, I'm just really unexperienced with this stuff. I would appreciate the help! Also, is there a guide or a tutorial for entities somewhere that lists all these different lines and their meanings? Like, I get that "model" usually 'spawns' a map_object but what does it mean when it's followed by "*1"? Or what are "spawnflags"? I have no idea. I'm sure entity modding would be much easier if I knew what these are for. P.S. Sorry for the extremely long and complicated post. EDIT Never mind. I managed to figure it out. I compared the original map with my entity modded map in Radiant. Turned out the 7 Imperials weren't connected to the target_counter. My script is now triggered and the cutscene plays. One strange thing, though. I connected all 7 Imperials to the target_counter, and as shown above it contains the line "count" "7". However, for reasons unknown, my cutscene starts after I kill the 6th Imperial, not the 7th. It's a minor problem really, I can delay the cutscene with the "wait" command, but I'm curious. Does anybody know? Also, my last paragraph from the original post is still relevant: 'is there a guide or a tutorial for entities somewhere that lists all these different lines and their meanings? Like, I get that "model" usually 'spawns' a map_object but what does it mean when it's followed by "*1"? Or what are "spawnflags"?' Link to comment
mrwonko Posted July 8, 2022 Share Posted July 8, 2022 I don't know why your counter is off by one (I guess something unexpected targets it?), but I can explain the "cm_inlinemodel: bad number". Triggers are brush entities, i.e. their volume is represented using brushes, which get compiled into "inline models", i.e. brush models baked into the bsp file. Entity modding keeps these unchanged, and on this map there seem to be 166 of them (*0 to *165). You can reference existing ones, and move them around, but you can't add new ones, at least not with the existing tools. Link to comment
KyleFan Posted July 15, 2022 Author Share Posted July 15, 2022 Thanks for the info, mrwonko! I understand it now. About the counter, I thought that maybe an unwanted npc was targeted by it on accident. But I played through the map without killing anyone except for those 7 guys who were targeted... again, the cutscene started after I killed the 6th. So I had the idea to just simply change the counter to "8". Now it works the way I intended. A strange thing indeed, but it's fine by me. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now