I am really interested in creating dungeons and junk. Right now the skeletons of the system at set up. Walls can be placed, I have my doors at the ready ect, but the meat of this code is really hard for me.
Is there a cool guy on here who might be willing to help me out? I can sorta see where the coder is going with it...in chunks. But then again chunks do me little good.
EDIT: haha I'm such a dork, I forgot to add the planets to their group. DERP.
Fixed, try it yourself (go to int trigger). I'll be tinkering with the settings.
EDIT+: Alright, fixed that by removing planets from the collidebounce trigger.
Thanks again, you've been a great help!
Alright, well I be closin' the thread me mates. Thanks again for everyone's help, and I'll be attaching my modified physics engine for everyone to peruse and what have you.
I'll try it, but I'm not trying to pull the planets together. Rather, I'm trying to pull units toward the planets. The distance conditions are where the unit will orbit. Being mostly arbitrary for now.
I'll get back with an edit on how it went.
Also, I'm not seeing the distance squared function, I take it that's one I should do?
Not a problem and don't worry, I know the feeling sometimes. You'll find SC2mapster to be fast and generally helpful when you post questions as no doubt you'll see your other questions answered either within the day or the next couple.
There are times where you might need to bump or won't get a full answer, but there's also the IRC channel where most of the more advanced users hang and if you can tolerate waiting for a few hours there's generally help to be had there too.
Well, you could make an event that if a unit enters the proximity of the unit it will cast it. AI is a lot more difficult for me than most other things.
Really, if you're just looking at a basic auto-cast, though, order the unit to move and such (or create your own little AI brain) and then if a unit is within range cast abilities based on priority.
As far as priority goes, all you need to do is create an array of abilities, add each ability in (again, according to priority [so an ability that you want to be cast over all others would be [1]), and then have the computer cast at the prioritized unit.
Advanced AI isn't my bag so if that's what you're looking for I won't be able to help you. There are a couple of people on here who I am sure can create an advanced AI or help even, but they are few and far between and don't regularly check the forums to the best of my knowledge.
I'm trying my hardest to try to figure out how to use these practically in the trigger editor, but I'll be honest changing practical equations to coding language that works (especially for sc2) was never my strong suit.
I believe I need to know the acceleration due to gravity to know how fast it's going and then the vector to (understand?) where the unit will be in, say, one second relative to both.
Am I missing something here? Is there any chance I could get a "Physics to SC2 for Dummies" explanation? ;^.^
Well I had tried that but I can only go to .000x and I don't believe I can multiply by numbers with a ^x value or multiply by negative numbers. So I can't use the correct value of gravity.
I tried to use much smaller numbers for other values to try to make up for it but everything moved too fast or didn't work. If you have a coded version that works you'd like to show me I'm all eyes but as far as I know the actual gravity equation (by itself at least) doesn't work in SC2.
Also if you could explain how vectors work a little so I can sorta get an idea of how to code it I'd appreciate that. I looked at the explanation of vectors in the physics tut from 2010 but it didn't really explain it how it relates to the actual coding process. Simply what they were.
I suggest you make a variable which saves the hero value.
Do something like:
VariablesHeroint=0<Integer>HEROISTAKEN=False<Boolean[MAXIMUMNUMBEROFHEROESHERE]>ConditionsActionsVariable-SetHeroint=(Randomintegerbetween0OR1DEPENDINGONWHICHYOURSYSTEMSTARTSandMAXIMUMNUMBEROFHEROESHERE)General-Repeat(Actions)foreverActionsGeneral-If(Conditions)thendo(Actions)elsedo(Actions)IfHEROISTAKEN[Heroint]==FalseThenVariable-SetHEROISTAKEN[Heroint]=TrueTrigger-RunDOWHATEVERITISYOUDOTOSPAWNUNITS(CheckConditions,Don't Wait until it finishes)General-BreakGeneral-SkipremainingactionsElseVariable-SetHeroint=(Randomintegerbetween0OR1DEPENDINGONWHICHYOURSYSTEMSTARTSandMAXIMUMNUMBEROFHEROESHERE)
It is a little sloppy but with a few more lines of code that suit your fancy you could also stop the trigger from trying to randomize to the same number. I just don't feel like doing actual coding right now.
I modified my orbit trigger accordingly but no dice. Really I'm looking for some kind of..."pull" trigger I suppose. Something that is similar to Orbit Library, but since I can't see any of the triggers or their dependencies I need a way to do this myself. Beside that fact it isn't exactly what I want.
So far I haven't had a problem with that, but I'll keep it in mind.
Just so everyone is aware, I tried to move the orbit library over when I noticed I could see the stuffs I needed to, but I got an error with the function declarations and so I couldn't go any farther.
I am struggling with how to implement this, because honestly I don't even know where to start, but I'll keep you peeps as updated as possible with any future problems/breakthroughs.
I have semi-fixed the problem with force data values. I would prefer a trigger gravity system as it is more flexible so please continue suggesting.
0
@SoulTaker916: Go
Well right now I use the grid boxes via points for the system. Would that work?
As well, I'm still having a hard time even visualizing where I should start, let alone how to implement it fully.
0
@SoulTaker916: Go
Its not so much actually converting the code verbatim into galaxy, but to convert it in a way that works with galaxy.
If I'm understanding you correctly, you can't do that. Am I right?
0
I am really interested in creating dungeons and junk. Right now the skeletons of the system at set up. Walls can be placed, I have my doors at the ready ect, but the meat of this code is really hard for me.
Is there a cool guy on here who might be willing to help me out? I can sorta see where the coder is going with it...in chunks. But then again chunks do me little good.
0
@LosTacos: Go
EDIT: haha I'm such a dork, I forgot to add the planets to their group. DERP.
Fixed, try it yourself (go to int trigger). I'll be tinkering with the settings.
EDIT+: Alright, fixed that by removing planets from the collidebounce trigger.
Thanks again, you've been a great help!
Alright, well I be closin' the thread me mates. Thanks again for everyone's help, and I'll be attaching my modified physics engine for everyone to peruse and what have you.
0
@LosTacos: Go
Edit: Wait...no. I'll PM my map to you and maybe you'll be able to make heads or tails of this. Warning, it's rather messy.
0
@LosTacos: Go
I'll try it, but I'm not trying to pull the planets together. Rather, I'm trying to pull units toward the planets. The distance conditions are where the unit will orbit. Being mostly arbitrary for now.
I'll get back with an edit on how it went.
Also, I'm not seeing the distance squared function, I take it that's one I should do?
0
@KingOfFate: Go
Not a problem and don't worry, I know the feeling sometimes. You'll find SC2mapster to be fast and generally helpful when you post questions as no doubt you'll see your other questions answered either within the day or the next couple.
There are times where you might need to bump or won't get a full answer, but there's also the IRC channel where most of the more advanced users hang and if you can tolerate waiting for a few hours there's generally help to be had there too.
0
@KingOfFate: Go
Well, you could make an event that if a unit enters the proximity of the unit it will cast it. AI is a lot more difficult for me than most other things.
Really, if you're just looking at a basic auto-cast, though, order the unit to move and such (or create your own little AI brain) and then if a unit is within range cast abilities based on priority.
As far as priority goes, all you need to do is create an array of abilities, add each ability in (again, according to priority [so an ability that you want to be cast over all others would be [1]), and then have the computer cast at the prioritized unit.
Advanced AI isn't my bag so if that's what you're looking for I won't be able to help you. There are a couple of people on here who I am sure can create an advanced AI or help even, but they are few and far between and don't regularly check the forums to the best of my knowledge.
0
@KingOfFate: Go
Give control of a unit in proximity, like the Warcraft taverns
Make the computer cast spells, I made snipe cost nothing and removed attack and the computer still wouldn't use snipe
Basically
Random Number Generator? Seems to me cycle is the RNG thing but haven't got to test it out yet
That's all I really know how to do, and I'm sure someone else knows the rest.
0
@LosTacos: Go
EDIT: fixed most everything, still a little laggy but less noticeable now.
So I'm using this code:
Just a snippet of your move units section with my custom code. Since this takes place in space there is no friction or Z gravity.
So now the units get pulled but oftentimes they don't get pulled toward the star but toward the edge of the map...what the heck? Any ideas?
0
@willuwontu: Go
I'm trying my hardest to try to figure out how to use these practically in the trigger editor, but I'll be honest changing practical equations to coding language that works (especially for sc2) was never my strong suit.
I believe I need to know the acceleration due to gravity to know how fast it's going and then the vector to (understand?) where the unit will be in, say, one second relative to both.
Am I missing something here? Is there any chance I could get a "Physics to SC2 for Dummies" explanation? ;^.^
0
@willuwontu: Go
Well I had tried that but I can only go to .000x and I don't believe I can multiply by numbers with a ^x value or multiply by negative numbers. So I can't use the correct value of gravity.
I tried to use much smaller numbers for other values to try to make up for it but everything moved too fast or didn't work. If you have a coded version that works you'd like to show me I'm all eyes but as far as I know the actual gravity equation (by itself at least) doesn't work in SC2.
Also if you could explain how vectors work a little so I can sorta get an idea of how to code it I'd appreciate that. I looked at the explanation of vectors in the physics tut from 2010 but it didn't really explain it how it relates to the actual coding process. Simply what they were.
0
@fishy77: Go
I suggest you make a variable which saves the hero value.
Do something like:
It is a little sloppy but with a few more lines of code that suit your fancy you could also stop the trigger from trying to randomize to the same number. I just don't feel like doing actual coding right now.
0
@MacSC2: Go
Have you tried saving and reentering the editor? Making sure to open the trigger editor in a fresh map first?
You're using a Mac if I'm not mistaken and this is not a problem I've ever experienced, but I'll try to help as best I can.
0
@AstralCV: Go
I modified my orbit trigger accordingly but no dice. Really I'm looking for some kind of..."pull" trigger I suppose. Something that is similar to Orbit Library, but since I can't see any of the triggers or their dependencies I need a way to do this myself. Beside that fact it isn't exactly what I want.
@XLIIVI: Go
So far I haven't had a problem with that, but I'll keep it in mind.
Just so everyone is aware, I tried to move the orbit library over when I noticed I could see the stuffs I needed to, but I got an error with the function declarations and so I couldn't go any farther.
I am struggling with how to implement this, because honestly I don't even know where to start, but I'll keep you peeps as updated as possible with any future problems/breakthroughs.
I have semi-fixed the problem with force data values. I would prefer a trigger gravity system as it is more flexible so please continue suggesting.