Kengo Posted August 6, 2002 Share Posted August 6, 2002 Another scripting question...anyone got any idea how to set it so that if you clear a load of enemies, say 10 stormtroopers or something, then it runs a script, in this case would run a cinematic? Link to comment Share on other sites More sharing options...
Joben Posted August 6, 2002 Share Posted August 6, 2002 I donno how to do it realy, only just learning scripting so this is a semi-educated guess. But i think stuff like this is possible, remember in The Ladder the next squad spawns after you kill all the members of the current one. So you might want to look there for a possible method for doing this sort of thing. Link to comment Share on other sites More sharing options...
Drakewl Posted August 6, 2002 Share Posted August 6, 2002 give your stormtroopers an NPC_target key with a value like "deathcount1" then create a target_counter with the key "count" and the corresponding value (amount of stormtroopers where every killed stormtrooper adds 1 to the count). If you have 4 Stormtroopers, then add 4 as the value for the count key. Give your target_counter the key "targetname" with the value "deathcount1". Then implement a usescript-command into the target_counter entity and you can run as many cinematics as you want hope this helps Link to comment Share on other sites More sharing options...
Kengo Posted August 7, 2002 Author Share Posted August 7, 2002 Thanks a lot man, that's a big help Link to comment Share on other sites More sharing options...
Joben Posted August 8, 2002 Share Posted August 8, 2002 lol that seems like a very complicated way to increment a variable. Sometimes i wish you could just insert chunks of simple C code into your maps Editing for this game gives me headaches Link to comment Share on other sites More sharing options...
lassev Posted August 8, 2002 Share Posted August 8, 2002 Why, to me it seems as simple as it can be, considering the building blocks you actually have in Radiant (and the game). Maybe I should invent some way to implement that kind of stuff to my map, though I have no idea yet, where I'd need such counter deeds. No, wait. One might actually use it also with switches, so that you had to use multiple switches in many places to get some machine, door or whatever to work. That's what I'm gonna do. Thanks Drakewl for the idea. Link to comment Share on other sites More sharing options...
alanuk Posted August 8, 2002 Share Posted August 8, 2002 i would of dont a trigger push set of a button and set the tirgger push to only fire ncp when the button is pushed alan Link to comment Share on other sites More sharing options...
Dea Posted February 6, 2003 Share Posted February 6, 2003 how do I prevent the counter from removing itself? I set bounceCount to -1, but that has no effect at all Link to comment Share on other sites More sharing options...
Kengo Posted February 6, 2003 Author Share Posted February 6, 2003 Man....this is an old topic - still, good to see people are using the search function eh? I don't see the problem - the target_counter is fired after a certain number of other things are killed/used, then it fires something else like a cutscene or some other big of scripting. Why would you not want it to be removed after? Link to comment Share on other sites More sharing options...
Dea Posted February 7, 2003 Share Posted February 7, 2003 in my map the game spawns randomly one, two or three opponents. After all opponents are killed the map should 'reset' the trigger so another wave can spawn. This all works untill I get a certain wave for the second time. IE, I get a wave of three, then a wave of two, then another wave of three. After the three are killed the trigger does not reset because the counter removed itself Link to comment Share on other sites More sharing options...
Kengo Posted February 7, 2003 Author Share Posted February 7, 2003 Ah I get it - that's pretty advanced stuff! Sounds good whatever it's for Could you have the target count connected to another target count.....so it spawns the NPCs and also a new target_count? Link to comment Share on other sites More sharing options...
Dragarius Posted February 8, 2003 Share Posted February 8, 2003 I think, now this may get complicated, that you could have an individual counter for each wave. As each wave completes...the trigger fires...and another counter tracks the number of waves. This other counter will fire when all waves are complete. Make sense? Link to comment Share on other sites More sharing options...
Kengo Posted February 8, 2003 Author Share Posted February 8, 2003 Ahh....now THAT is clever! So you can count target counters? Nice It isn't as flexible, but you can spawn one NPC when another is killed by linking the first NPC to another, the one you want to spawn after they die. You could link 10 together and one would spawn as soon as you killed another. But this is just another, not as good way of doing things Link to comment Share on other sites More sharing options...
Leslie Judge Posted February 8, 2003 Share Posted February 8, 2003 And here is an other bad idea Of course if I remember right. You can set the NPC-entity's "count" key and that entity will spawn a new NPC when the old one dies "count" times. Link to comment Share on other sites More sharing options...
Dragarius Posted February 8, 2003 Share Posted February 8, 2003 Another thought, borrowed from kejim_post. All NPCs have same target (death). First timer counts deaths and fires at say 3 and triggers respawn of however many. Second timer counts deaths but fires at 4 and triggers respawn, etc. Third timer fires at 7, fourth at 8, etc... Link to comment Share on other sites More sharing options...
Dea Posted February 9, 2003 Share Posted February 9, 2003 Thank you for all your sugestions, however I would still be limited to a fixed number of waves.. I was thinking maybe I could make my own counter with relays, enables and disables.. but sofar I've been unable to, any ideas on that? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.