liteluvr 0 Posted September 25, 2004 Share Posted September 25, 2004 Looking to assign a specific kit to a team in a MP mission. Got a block that loops through the NextActor to place them at specific effects on the map, but I want to assign them a certain kit. Here's what the script block looks like. Group: Insertion Effect Placement Comment: Insertion Effect Placement Trigger Event: An actor loop is ready to process NextActor. Responses: Allow this block to be reactivated. Decrement InsertCounter. Assign "knife.kit" to NextActor. Teleport NextActor to Insert Effect-Free. Continue executing responses if ((The value of InsertCounter) is greater than 1). Assign "knife.kit" to NextActor. Teleport NextActor to Insert Effect - RR1. Continue executing responses if ((The value of InsertCounter) is greater than 2). Assign "knife.kit" to NextActor. Teleport NextActor to Insert Effect - RR2. Continue executing responses if ((The value of InsertCounter) is greater than 3). Assign "knife.kit" to NextActor. Teleport NextActor to Insert Effect - RR3. Continue executing responses if ((The value of InsertCounter) is greater than 4). Assign "knife.kit" to NextActor. Teleport NextActor to Insert Effect - RR4. Continue executing responses if ((The value of InsertCounter) is greater than 5). Assign "knife.kit" to NextActor. Teleport NextActor to Insert Effect - RR5. Continue executing responses if ((The value of InsertCounter) is greater than 6). Teleport NextActor to Insert Effect - RR6. Continue executing responses if ((The value of InsertCounter) is greater than 7). Assign "knife.kit" to NextActor. Teleport NextActor to Insert Effect - RR7. Continue executing responses if ((The value of InsertCounter) is greater than 8). Assign "knife.kit" to NextActor. Teleport NextActor to Insert Effect - RR8. The placement works fine, but for some reason the SetActorKit doesn't work.... Ideas? Quote Link to post Share on other sites
jay316 0 Posted September 25, 2004 Share Posted September 25, 2004 (edited) edit : nevermind that won't fix it Edited September 25, 2004 by jay316 Quote Link to post Share on other sites
Jack57 0 Posted September 25, 2004 Share Posted September 25, 2004 You can lose all the SetKitActor's except the first one, as that one will always execute - no need to do it over and over. Why it's not assigning, I'm not sure. Assuming the kit actually exists and is set up properly. Normally it will crash the mission if it isn't but there are exceptions. Quote Link to post Share on other sites
San 0 Posted September 25, 2004 Share Posted September 25, 2004 Did you set a value for DecrementCounter ? Or is it possible for counters to go below zero (into the negative) ? Then it's OK else it's not OK ! Else I see nothing wrong too, except the fact I've seen an (example) actor-loop from Jack just the other way around (had to do some thinking to finally understand the logic!): He increments the counter and starts from the highest value to the lowest. Don't know why but he probably has a reason for it, so I just copy the man ! Quote Link to post Share on other sites
liteluvr 0 Posted September 25, 2004 Author Share Posted September 25, 2004 LOL.... he's the one who tipped me to this logic in the first place.... as for the kit, it's a valid kit, I can assign it to a character from inside the game, and it's the same kit that I specified in the script... so I'm not sure. The kit is in a different mod folder than the mission I'm scripting, but in MP, that shouldn't be a problem, with the mods activated properly and such. It's the knife kit in the HX5 Ranger kit, if that helps.... I suppose I could assign a proximity action to the effect to assign the kit, it just seemed like this ought to work better and cleaner.... The scenario I'm shooting for is the team inserts as POW's, but with their boot knives conveniently overlooked in the search... they knife a few distracted guards, get their kits, and you know the rest.... Quote Link to post Share on other sites
liteluvr 0 Posted September 26, 2004 Author Share Posted September 26, 2004 Found the problem... it was with the order of precedence of the script lines. Did some rearranging and ... voila! Group: <Default> Comment: Startup Block Trigger Event: The simulation is starting. Responses: Set Kit Set Timer to expire in 1 second(s). Enable the Insertion Effect Placement script blocks. Enable the SP Kit set script blocks. Set Player_Platoon to (The player-controlled platoon). Set Platoon Member Count to (The number of active actors on Player_Platoon). Set InsertCounter to 10. Enable the Kit Assignment script blocks. Use Insertion Effect Placement to loop over all actors in Player_Platoon after this block. Prevent players from changing avatars. Set AvatarSwithc Timer to expire in 5 second(s). Use Kit Assignment to loop over all actors in Player_Platoon after this block. Hide Rifle 2 from the game world. Hide Rifle 1 from the game world. If (The game mode is Single Player), stop and queue a call to SP Kit set. If (The game mode is Single Player), stop and queue a call to Insertion Effect Placement. If (The game mode is Coop), stop and queue a call to Insertion Effect Placement. Thanks for the assist. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.