LithianLord Posted May 9, 2010 Share Posted May 9, 2010 Hey mates, I can say I am getting much better with the GECK. Though I have hit a brick wall in that I know little in scripting to make something workable. I have poured over the official tutorials and youtube videos, but I still feel like I don't know enough. So this is a simple request for either links to better tutorials or advice on how to get something like this working. Basically, I want to have a simple electrical switch that (when pressed) will trigger an airstrike down on a specified location. The bridge behind the congress building has exactly what I am talking about in the effect. I would like to duplicate that in a new location with a few tweaks. Anything to forward my progress would be greatly appreciated. :thumbsup: Link to comment Share on other sites More sharing options...
angelwraith Posted May 12, 2010 Share Posted May 12, 2010 Hey mates, I can say I am getting much better with the GECK. Though I have hit a brick wall in that I know little in scripting to make something workable. I have poured over the official tutorials and youtube videos, but I still feel like I don't know enough. So this is a simple request for either links to better tutorials or advice on how to get something like this working. Basically, I want to have a simple electrical switch that (when pressed) will trigger an airstrike down on a specified location. The bridge behind the congress building has exactly what I am talking about in the effect. I would like to duplicate that in a new location with a few tweaks. Anything to forward my progress would be greatly appreciated. :thumbsup: this a set location or a changing one?making explosions happen at a specific place is easy to do with script.. there is just the question of HOW you want this location to be selected. Link to comment Share on other sites More sharing options...
LithianLord Posted May 12, 2010 Author Share Posted May 12, 2010 Hey mates, I can say I am getting much better with the GECK. Though I have hit a brick wall in that I know little in scripting to make something workable. I have poured over the official tutorials and youtube videos, but I still feel like I don't know enough. So this is a simple request for either links to better tutorials or advice on how to get something like this working. Basically, I want to have a simple electrical switch that (when pressed) will trigger an airstrike down on a specified location. The bridge behind the congress building has exactly what I am talking about in the effect. I would like to duplicate that in a new location with a few tweaks. Anything to forward my progress would be greatly appreciated. :thumbsup: this a set location or a changing one?making explosions happen at a specific place is easy to do with script.. there is just the question of HOW you want this location to be selected. Just a set location. Drop bombs on an exact location each time the button is pressed. Nothing fancy, I just can't seem to find out how to do this. :sweat: Link to comment Share on other sites More sharing options...
angelwraith Posted May 12, 2010 Share Posted May 12, 2010 Hey mates, I can say I am getting much better with the GECK. Though I have hit a brick wall in that I know little in scripting to make something workable. I have poured over the official tutorials and youtube videos, but I still feel like I don't know enough. So this is a simple request for either links to better tutorials or advice on how to get something like this working. Basically, I want to have a simple electrical switch that (when pressed) will trigger an airstrike down on a specified location. The bridge behind the congress building has exactly what I am talking about in the effect. I would like to duplicate that in a new location with a few tweaks. Anything to forward my progress would be greatly appreciated. :thumbsup: this a set location or a changing one?making explosions happen at a specific place is easy to do with script.. there is just the question of HOW you want this location to be selected. Just a set location. Drop bombs on an exact location each time the button is pressed. Nothing fancy, I just can't seem to find out how to do this. :sweat: ok this is a really easy thing to do my friend..gonna tell you the theory behind it rather than doing it for you though.. first you need a reference.. if there is one where you want the explosion to happen.. great.. otherwize find your location in geck and add a invisable marker where you want the explosion to happen.x-markers are perfect for such a thing. (under activators)give this x-marker a ref name so the explosions have a specific ref to look for.k now that the designator is taken care of the rest is a piece of cake.find a switch (one w/o animations i.e. levers is best)make a script for the switch liiikkkkeee: scn mycarpetbombexplosionscript begin onactivate designatorREFnamehere.placeatme typeOFexplosionYOUwantHere 1 end finally select this script in the switch's edit windowplace the switch in the world..and your done. start the game.. go hit the switch.. everything should work. Link to comment Share on other sites More sharing options...
LithianLord Posted May 13, 2010 Author Share Posted May 13, 2010 Hey mates, I can say I am getting much better with the GECK. Though I have hit a brick wall in that I know little in scripting to make something workable. I have poured over the official tutorials and youtube videos, but I still feel like I don't know enough. So this is a simple request for either links to better tutorials or advice on how to get something like this working. Basically, I want to have a simple electrical switch that (when pressed) will trigger an airstrike down on a specified location. The bridge behind the congress building has exactly what I am talking about in the effect. I would like to duplicate that in a new location with a few tweaks. Anything to forward my progress would be greatly appreciated. :thumbsup: this a set location or a changing one?making explosions happen at a specific place is easy to do with script.. there is just the question of HOW you want this location to be selected. Just a set location. Drop bombs on an exact location each time the button is pressed. Nothing fancy, I just can't seem to find out how to do this. :sweat: ok this is a really easy thing to do my friend..gonna tell you the theory behind it rather than doing it for you though.. first you need a reference.. if there is one where you want the explosion to happen.. great.. otherwize find your location in geck and add a invisable marker where you want the explosion to happen.x-markers are perfect for such a thing. (under activators)give this x-marker a ref name so the explosions have a specific ref to look for.k now that the designator is taken care of the rest is a piece of cake.find a switch (one w/o animations i.e. levers is best)make a script for the switch liiikkkkeee: scn mycarpetbombexplosionscript begin onactivate designatorREFnamehere.placeatme typeOFexplosionYOUwantHere 1 end finally select this script in the switch's edit windowplace the switch in the world..and your done. start the game.. go hit the switch.. everything should work. I really appreciate the help! This gives me some great ideas on some things I can try to do. Another question though, is it possible in script to make an action (press button or such) require items or caps? Say you need X caps to operate the button, the script checks your inv and if you have enough it activates the button and subtracts the said ammount from your inv? Link to comment Share on other sites More sharing options...
Ethre Posted May 13, 2010 Share Posted May 13, 2010 Looks like you've got all the help you need, and angelwraith has the right idea - you'll learn more by doing it for youself. :) But if you need an example for help - I think the SewardSqTalonFight01Switch01 script might be helpful? Link to comment Share on other sites More sharing options...
angelwraith Posted May 14, 2010 Share Posted May 14, 2010 Hey mates, I can say I am getting much better with the GECK. Though I have hit a brick wall in that I know little in scripting to make something workable. I have poured over the official tutorials and youtube videos, but I still feel like I don't know enough. So this is a simple request for either links to better tutorials or advice on how to get something like this working. Basically, I want to have a simple electrical switch that (when pressed) will trigger an airstrike down on a specified location. The bridge behind the congress building has exactly what I am talking about in the effect. I would like to duplicate that in a new location with a few tweaks. Anything to forward my progress would be greatly appreciated. :thumbsup: this a set location or a changing one?making explosions happen at a specific place is easy to do with script.. there is just the question of HOW you want this location to be selected. Just a set location. Drop bombs on an exact location each time the button is pressed. Nothing fancy, I just can't seem to find out how to do this. :sweat: ok this is a really easy thing to do my friend..gonna tell you the theory behind it rather than doing it for you though.. first you need a reference.. if there is one where you want the explosion to happen.. great.. otherwize find your location in geck and add a invisable marker where you want the explosion to happen.x-markers are perfect for such a thing. (under activators)give this x-marker a ref name so the explosions have a specific ref to look for.k now that the designator is taken care of the rest is a piece of cake.find a switch (one w/o animations i.e. levers is best)make a script for the switch liiikkkkeee: scn mycarpetbombexplosionscript begin onactivate designatorREFnamehere.placeatme typeOFexplosionYOUwantHere 1 end finally select this script in the switch's edit windowplace the switch in the world..and your done. start the game.. go hit the switch.. everything should work. I really appreciate the help! This gives me some great ideas on some things I can try to do. Another question though, is it possible in script to make an action (press button or such) require items or caps? Say you need X caps to operate the button, the script checks your inv and if you have enough it activates the button and subtracts the said ammount from your inv? yes, and youve nailed the theory exactly here is the code to back it up (this would cost 100 "yourcurrencytype" to fire the previous script and only if available): scn mycarpetbombexplosionscript begin onactivate if (player.getitemcount yourcurrencytype >= 100) designatorREFnamehere.placeatme typeOFexplosionYOUwantHere 1 player.removeitem yourcurrencytype 100 endif end there is however an issue with this, an unsuccessful attempt to activate the switch due to lack of funds would seem the switch is just broken because it just wouldn't do anything.. in these scenarios it is necessary to inform the player of the reason their action isn't working. this is not extremely difficult go to messages in the object tree and create a new onethere are a few options here but i would suggest a popup message that lasts 2-3 seconds that has some text to the effect of "insufficient funds" name the message something related to its purpose so you can use it for other things like NoFundsMSGand then make the message show when the player is short on supplies for the switch like this: scn mycarpetbombexplosionscript begin onactivate if (player.getitemcount yourcurrencytype >= 100) designatorREFnamehere.placeatme typeOFexplosionYOUwantHere 1 player.removeitem yourcurrencytype 100 else ShowMessage NoFundsMSG endif end Link to comment Share on other sites More sharing options...
Recommended Posts