| 11-14-2003, 06:12 AM | #1 |
I am not a Noob when it comes to triggers, I can do almost anything i want, though i won't blow my own horn too much. However, if the trigger are perfect but don't work I start to worry (my level is a plane game with complcated control system, left makes the direction of the plane [always moving] change as does right: North -> North-West -> West ...etc) -it goes from north directly to East when I press right (instead of North-East), Triggering is perfect on all levels, I can't see what's wrong. -left always makes the plane face north, no matter what direction I was previously pointing even though each "if/then/else" actions for left is unique. -the plane suddenly stops in mid air even though it still turn, though i may have some idea what is causing this. If I havn't painted a good picture then dl the map (very basic, tiny), play it and say to yourself, "man he's screwed this up but i'll fix it" and then realise that all the triggers are perfect, they just don't correspond to the actions that happen. BTW map is so basic it dosn't even have a name yet (eg: just another war3 map, plain dirt [default]... etc) |
| 11-14-2003, 01:04 PM | #2 |
Right away, I see a problem. You have a list of If/thens, and executing one will allow another to execute. For example, on Right: If N = True, Then N = False, NE = True And later in the list If NE = True Then NE = False, E = True If N is true, both if/thens will run. You need to nest these to prevent that from occurring. Editing the map a little bit, I'll attach it once I get it working. |
| 11-14-2003, 01:07 PM | #3 |
I nested the if/thens, and put conditions on the N, E, etc. triggers just to confirm that N = true, etc. It's never a bad idea to use conditionals. Enjoy! |
| 11-14-2003, 01:37 PM | #4 |
Instead of using nested if/then statements, use arryas, when applicable. |
| 11-14-2003, 01:56 PM | #5 |
How would that be applicable? Wouldn't you still need if/thens to check the array and change numbers around? |
| 11-15-2003, 02:17 AM | #6 |
I don't quite understand what i did wrong still but I'll have a look at the map... BTW the Booleans N,S,E,W,NE...etc represent the question, is the player pointing north? Still those two actions, the first one is (or is supposed to be): EVENT: right button pushed 1. if: N = true then: set N = false set NE = true run: NE (makes the player go north east to the end of the map) (edit: this is in the new version wich has the same problem only with a few minor problems fixed, see next post) 2. if: NE = true (NE =/ N) then: set NE = false set E = true run E (makes player go east...) Because NE is never true when N is true (if it was that would mess everything up) no two if/then/elses should stimulate the same thing (eg: north) |
| 11-15-2003, 02:31 AM | #7 |
Ooops somthing i forgot to say and mabye it was a stupid idea to do. Well, you know how the plane is all juttering? I've fixed that, also the disabled triggers have be fixed (didn't want to delete by the wern't working very well). This new version still uses the same handling system (you now what i mean... or well kinda the same) but different speed, and mouvment (you can now take off, land and adjust ur speed along with the plane not juttering and going faster). Anyway the probleme is: i can't add triggers, only replace, I can redo what i have done but before i do, do you have any ideas? somthing else i may be changing: N,S,E,W... etc are inpractical, i may replace them with one variable called player direction (real). PS: I'll give you this version so far (still screwed up handling) to show you the brilliance of my working triggers. Backwards is now slow dow (stop = land) Forwards is now speed up (stoped = take off). You can just use the normal mouse controls instead of the messed up ones.... And finally, missiles (not yet included, inividual unit) can't "attack" land unit, i need i way to stop people drop out of the sky like rocks whenever i missile comes near! BTW you will be on the credits! anything you want me to write? |
| 11-15-2003, 02:42 AM | #8 | |
Quote:
What do you mean? Do you want us to make the missles kill people, or do you want us to prevent people from land quickly to avoid them? You forgot the map too. |
| 11-15-2003, 02:48 AM | #9 |
alright here is the map, don't edit it just have a look at takoff and landings and comment... I AM going to swap N,S,E,W... for one variable, that way (seeing as this is a multiplayer map) I won't have to make p1N, p2N, p3N...etc. That is why not to edit it... I will tell you if i still have problemes but will use ur version as reference... Sry about forgetting the map, kinda got carried away and i have only just realised you can edit and attach. Missiles: I just need help thinking of a way to stop people from landing really fast... I thought of cooldwons but it nakes it rather jerky... The missiles are easy, they AOE which effects themselves who, of course using a CC attack, explode. They "home in" because of an aquisition range. |
| 11-15-2003, 02:55 AM | #10 |
You'll need to unpack that a bit, I'm not sure what's a question and what's a statement. As for what went wrong: Basically, you listed a string of If/thens. If N = True Then set N = False, NE = True. That worked just fine. However, the trigger continued to run, and eventually encountered the statement: If NE = True Then set NE = False, E = True Meaning that if you were going north, and clicked right, you'd end up going east, because the plane was set to NE by one part of the trigger, and then set E by a later part. By nesting statements under the Else, you prevented the trigger. If <condition> Then <do function and then STOP> Else <keep reading and checking> On Credits: If you mention my handle (biflspud), that's cool; it's really not needed. Happy to help. On Directions: The 8 directions work ok; you could use an integer, however - 1 = north, 2 = northeast, et cetera. On missiles: Hunh? |
| 11-15-2003, 03:00 AM | #11 |
hmmm, pehaps just have missles hit the ground as well? Wait I know! Have them lock onto a target(if the angles is close enogh) then have the missle track verticly as well, howwever, also let players drop countermeasures that have a chance of making the mislle go in a random direction then explode. |
| 11-15-2003, 03:25 AM | #12 |
hmmm good idea, having the missiles on a timer will stop the map being flouded by them... the reason the missiles can't hit ground unit is that... well... I suppose it's time I explained the map a bit: The idea of the game is to destroy the opponents airbase, there are two types of plane (corresponding with 2 gyro modles) the one in the map is just a flying machine but represent a fighter. Each plane has a different objectif: -Fighters: kill other fighters to protect the Bombers -Bomber: Destroy enemy buildings -Pilots: get a new ship of either type (eg: get back to base in one piece) When a ship is hit a goes into a winding spiral while falling in which the user has no control, this is his pilot's chance to bale out, also the same "spinning fall" trigger will be used if the pilot decides to parachute normally, leaving the ship with not one to control it! Yes this map is kinda bassed on another one in ROC but the fact that there are two airbases ends the similarity... The reason missiles can't hit ground is that it would be too easy to snipe of buildings and pilots (hitting pilots with missiles that should be Air to Air is a bit weird) anyway, the missiles are heat seeking, they don't hit planes with no engine on (quick turn it off!) edit: sorry, i forgot about the "missile distraction idea" I think it's very good, all you need is a dumby object with high priority, the problem however is controls, i only have up, down, left, right and Esc (skip cinematic) Esc is fire BTW. I am not sure about how the pilot bales out, and how you change weapon (originally the fighters had a machine gun) |
| 11-15-2003, 03:37 AM | #13 |
thx Biflspud I have put ur name down, I am trying to find a nice background, do you guys know which format it needs to be in, my pics are under "other". Here is one of them, i have 2 to see which one looks better: edit: I wonder why thats so small all of a sudden... it was 417 by 720 or somthing... got it off google, mabye it's because i couldn't look at the full sized image... the file is "plane over clound.jpg" |
| 11-15-2003, 04:00 AM | #14 |
Right so you put the other in each other's else bit's right.. well i did that and it's not working! I've made some changes to make it easier to export into the real map when the triggers are done. changes: -the variable angle1 replaces N,NE,E,S...etc -using the variables pilot1 and plane1 I can referre to the example (flying machine) or any other thing, very easyly. PS: 60 views... I have changed the title (I think it worked) to a discussion of keyboard mouvment triggering, as this is what it has become. so anyone who is interested in these triggers and how they work, just ask... There are simpler ways of doing this than mine! |
| 11-15-2003, 08:38 AM | #15 |
errr that actually isn't right is it, you put the other if/then/elses in each other elses in the original one, right? Well it ain't working I am have had enough, mabye i make induvidually trigger for each... I sure am messed up... I did ur thing but though my plane controls work most of the time they jam up or randomly turn when i don'y want them to! Here is the next version of the map, I won't do anything while you edit it I promise but just fix it one more time please! |
