Hi, I'm new to Starcraft modding, but not to programming. I've read a bit about triggers and where they can fire and such but still feel like I'm missing a few key points. Can anyone tell me if there's a way to attach script before a map or replay starts?
The point being, I really want to make a script that will be running all the time whenever I play the game. It would be kind of like in Unreal Tournament where some game event fires and the announcer says "Unstoppable!", and various other things like that. I want it to be able to detect any relevant event and fire code specific to that event no matter whether I'm playing a stock map, a downloaded map, or even some replay.
Can anyone give me a sitrep on this trigger scripting thing? Much thanks from an SC2 scripting noob.
Welcome to mapster! Feel free to send me a PM if you need anything.
Anyways, you put scripts (Aka triggers) into your own custom maps. You can't mess with other people's maps.
Basically, you make triggers run with events. You would set up some kind of event like "unit dies" and have that run the script to play the sound effect. You might want to take a look at this tutorial I wrote, just to grasp the basics of the system.
Only way I can think of is to write the script in a library then import it into .sc2mod file. After which, just set the mod file as a dependency for every map that you would like to hear that script running on. Unfortunately.. This would mean every single map you play must have the dependency set, or it would not work. This unfortunately is impossible to control in cases where you are not the author of the map.
That's the closest I can think of to what you're trying to achieve, but at this point, I don't think its possible to do what you ask.
Mods are actually how some games such as ZHRPG work (If I understand their use correctly) The core game engine itself is typically stored in the mod so it can be easily loaded to any ZHRPG map. Each map would also have it's own triggers that are exclusive to the engine elements.
Yes it does. Thank you very much. That's too bad, but it makes sense...
The mod thing would work, but I would have to set the dependency in all the other maps, and I'm thinking Starcraft is not gonna let you play any games if your version of the map is different from another players... even if it's just a dependency added? I can't see how anyone would cheat on a replay so maybe the game won't care if my version of the map is different from the version used in a replay.
Hi, I'm new to Starcraft modding, but not to programming. I've read a bit about triggers and where they can fire and such but still feel like I'm missing a few key points. Can anyone tell me if there's a way to attach script before a map or replay starts?
The point being, I really want to make a script that will be running all the time whenever I play the game. It would be kind of like in Unreal Tournament where some game event fires and the announcer says "Unstoppable!", and various other things like that. I want it to be able to detect any relevant event and fire code specific to that event no matter whether I'm playing a stock map, a downloaded map, or even some replay.
Can anyone give me a sitrep on this trigger scripting thing? Much thanks from an SC2 scripting noob.
@scdeveloper: Go
Triggers or "script" can only be implemented in custom maps that you insert it into.
It can not effect ladder games or other peoples custom maps.
@scdeveloper: Go
Welcome to mapster! Feel free to send me a PM if you need anything.
Anyways, you put scripts (Aka triggers) into your own custom maps. You can't mess with other people's maps.
Basically, you make triggers run with events. You would set up some kind of event like "unit dies" and have that run the script to play the sound effect. You might want to take a look at this tutorial I wrote, just to grasp the basics of the system.
@zeldarules28: Go
So there aren't any events scriptable before a map is loaded?
nope its scripted in the map.....
go take a look at how it works....
@scdeveloper: Go
Only way I can think of is to write the script in a library then import it into .sc2mod file. After which, just set the mod file as a dependency for every map that you would like to hear that script running on. Unfortunately.. This would mean every single map you play must have the dependency set, or it would not work. This unfortunately is impossible to control in cases where you are not the author of the map.
That's the closest I can think of to what you're trying to achieve, but at this point, I don't think its possible to do what you ask.
Mods are actually how some games such as ZHRPG work (If I understand their use correctly) The core game engine itself is typically stored in the mod so it can be easily loaded to any ZHRPG map. Each map would also have it's own triggers that are exclusive to the engine elements.
Hope that all makes sense.
Yes it does. Thank you very much. That's too bad, but it makes sense...
The mod thing would work, but I would have to set the dependency in all the other maps, and I'm thinking Starcraft is not gonna let you play any games if your version of the map is different from another players... even if it's just a dependency added? I can't see how anyone would cheat on a replay so maybe the game won't care if my version of the map is different from the version used in a replay.
At least I'd have that.
@scdeveloper: Go
ummm .... you cant add triggers to replays..... you cant add anything to core maps.... only your own...
Nobody can complain on a replay, bt different thread execution would eventually risk the replay to desync
Go play Antioch Chronicles Remastered!
Also, coming soon, Antioch Episode 3: Thoughts in Chaos!
Dont like mapster's ugly white? Try Mapster's Classic Skin!