devinpatterson Posted October 10, 2012 Share Posted October 10, 2012 The error power up is giving me when I try to save is: Line 25 - mismatched begin/end block - Line 25 endif Set Status to 0 endif endif Oh OK well that's easy. change that last "endif" to end, because it's the end of a begin gamemode block, not the end of a if statement. Now lets see if what's flagged next by powerup.. Link to comment Share on other sites More sharing options...
Deleted2746547User Posted October 10, 2012 Author Share Posted October 10, 2012 You rock... brb. Link to comment Share on other sites More sharing options...
Deleted2746547User Posted October 10, 2012 Author Share Posted October 10, 2012 (edited) here's one for you.... scn BlackbriarWashoeBaseServicesRoofGuardBuildScript short BlackbriarSoldierDogtagvariable Begin onActivate If player.GetItemCount BlackbriarSoldierDogtag >= 1 player.removeItem BlackbriarSoldierDogtag 1 BlackbriarWashoeBaseSrvcsGuardPlacement.enable; enables x marker to place soldier on roof ShowMessage BlackbriarWashoeRectRoofGuardPlacementMsg Else ShowMessage BlackbriarWashoeReceptionoofGuardBuildNeedMsg Endif end What this does is takes a resource I call soldier dog tag (Guard Resource) and turns on an x marker to enable a guard to be placed. And this works fine...My question/problem is what I want to do is have it allow you to spawn another guard (let's say the first one gets killed). Something later to think about would possibly give you a message if the current guard is dead or under attack (would be neat too)..... Is there a better way to do that? Thanks... AND THANKS AGAIN for all of you guys/gals help so far... I really struggle with scripting and it helps to have someone look it over and tell me where to go.... THANK YOU Edited October 10, 2012 by Guest Link to comment Share on other sites More sharing options...
devinpatterson Posted October 10, 2012 Share Posted October 10, 2012 What this does is takes a resource I call soldier dog tag (Guard Resource) and turns on an x marker to enable a guard to be placed. And this works fine...My question/problem is what I want to do is have it allow you to spawn another guard (let's say the first one gets killed). Something later to think about would possibly give you a message if the current guard is dead or under attack (would be neat too)..... Is there a better way to do that? I'd use getdead. Have a few guards disabled and waiting in limbo to replace their fallen comrades. Put an if statement in there to check if the first guard is dead (nested in your if statement for the dog tag) and if it returns a 1 enable the next guy for duty. Link to comment Share on other sites More sharing options...
devinpatterson Posted October 10, 2012 Share Posted October 10, 2012 or an if else on the getdead to run though a bunch of guards (as many as you want in reserve). Link to comment Share on other sites More sharing options...
Deleted2746547User Posted October 10, 2012 Author Share Posted October 10, 2012 (edited) What this does is takes a resource I call soldier dog tag (Guard Resource) and turns on an x marker to enable a guard to be placed. And this works fine...My question/problem is what I want to do is have it allow you to spawn another guard (let's say the first one gets killed). Something later to think about would possibly give you a message if the current guard is dead or under attack (would be neat too)..... Is there a better way to do that? I'd use getdead. Have a few guards disabled and waiting in limbo to replace their fallen comrades. Put an if statement in there to check if the first guard is dead (nested in your if statement for the dog tag) and if it returns a 1 enable the next guy for duty. Question though: how would that work - I mean, let's say you had 15 guards in reserve (which is going to be a lot of markers when you consider this are going to be guard stations all over creation... :) How would you write that? Ive looked at the link but it;s in practice I don't get how you'd write that out :/If Edited October 10, 2012 by Guest Link to comment Share on other sites More sharing options...
Deleted2746547User Posted October 10, 2012 Author Share Posted October 10, 2012 (edited) By the way, the mod is coming along nicely. I have to add construction times to the various activators but it's looking nice. I have anvils (idea taken from RTS) appear where things can be built. Activating gives you a message (if you don't have the resources) of what you need to build - maybe I should rework that to give you a menu that tells you what you need, and let's you choose to proceed or not. Gotta figure that out. I have street cleaners to activate massive cleaning/recycling activators: powder gang north, NCRCF, etc. <<<After the quests to secure NCRCF are accomplished you will gain a tool that lets you "collect" every available item and turn it into raw materials (still having scripting problems with that.) The activators disappear when activated! The Ranch/Salt works, etc. build. The patrols work mostly (except for the occasional getting stuck at points along their route or falling through floors. :( The foundation/groundwork for most aspects are in place. Just wish I was better at scripting... this would go a lot faster.... Edited October 10, 2012 by Guest Link to comment Share on other sites More sharing options...
devinpatterson Posted October 10, 2012 Share Posted October 10, 2012 Question though: how would that work - I mean, let's say you had 15 guards in reserve (which is going to be a lot of markers when you consider this are going to be guard stations all over creation... :) How would you write that? Ive looked at the link but it;s in practice I don't get how you'd write that out :/If Well I'm at work so I can't check a lot of resources or the geck at the moment, but i'd put it in after you check for a dog tag, then have an else for each soldier, just going down the line == 0 (ie is alive), until it finds one that hasn't been killed off. I'm thinking yhou could use the same marker for all of them? scn BlackbriarWashoeBaseServicesRoofGuardBuildScript short BlackbriarSoldierDogtagvariable Begin onActivate If player.GetItemCount BlackbriarSoldierDogtag >= 1 player.removeItem BlackbriarSoldierDogtag 1 BlackbriarWashoeBaseSrvcsGuardPlacement.enable; enables x marker to place soldier on roof ShowMessage BlackbriarWashoeRectRoofGuardPlacementMsg if guard1Ref.getDead == 0 guard1Ref.enable elseif guard2Ref.getDead == 0 guard2Ref.enable elseif guard3Ref.getDead == 0 guard2Ref.enable ;do this for however many guards you want endIf Else ShowMessage BlackbriarWashoeReceptionoofGuardBuildNeedMsg Endif end Link to comment Share on other sites More sharing options...
devinpatterson Posted October 10, 2012 Share Posted October 10, 2012 Oh and you might want to put a final else statement in there in case all the guards are dead that displays a note for the player. Link to comment Share on other sites More sharing options...
Deleted2746547User Posted October 10, 2012 Author Share Posted October 10, 2012 (edited) Question though: how would that work - I mean, let's say you had 15 guards in reserve (which is going to be a lot of markers when you consider this are going to be guard stations all over creation... :) How would you write that? Ive looked at the link but it;s in practice I don't get how you'd write that out :/If Well I'm at work so I can't check a lot of resources or the geck at the moment, but i'd put it in after you check for a dog tag, then have an else for each soldier, just going down the line == 0 (ie is alive), until it finds one that hasn't been killed off. I'm thinking yhou could use the same marker for all of them? scn BlackbriarWashoeBaseServicesRoofGuardBuildScript short BlackbriarSoldierDogtagvariable Begin onActivate If player.GetItemCount BlackbriarSoldierDogtag >= 1 player.removeItem BlackbriarSoldierDogtag 1 BlackbriarWashoeBaseSrvcsGuardPlacement.enable; enables x marker to place soldier on roof ShowMessage BlackbriarWashoeRectRoofGuardPlacementMsg if guard1Ref.getDead == 0 guard1Ref.enable elseif guard2Ref.getDead == 0 guard2Ref.enable elseif guard3Ref.getDead == 0 guard2Ref.enable ;do this for however many guards you want endIf Else ShowMessage BlackbriarWashoeReceptionoofGuardBuildNeedMsg Endif end See you all are the bomb diggity...? It would take me an eon to figure out that code! Ok, I will try that! Edited October 10, 2012 by Guest Link to comment Share on other sites More sharing options...
Recommended Posts