| 02-29-2004, 01:25 AM | #1 |
i was inputting lots of stuff in my map last night and today when i tried testing it , the map wouldn't load all the way it stopped almost near the end of the loading bar but just got stuck there i was sorta panicky and didnt know what was wrong after disabling the new stuff i put in and testing a few times putting one thing back at a time i figured out it was the triggers event - when a unit enters playable map area Events Unit - A unit enters (Playable map area) Conditions (Unit-type of (Triggering unit)) Equal to Naga Sea witch Actions Game - Display to (All players controlled by a ((Owner of (Triggering unit)) controller) player) for 9.40 seconds the text: You got... before i implemented that i tested it on a small test map the event - when a unit enters playable map area and it worked in conjuction with action - create unit at region i have that trigger repeated 42 times (for each of my heroes) and i think thats what messed it up anyone know why it would stop my map from loading completely? or how i can make a trigger that will tell each player a bit of info of the character they got (heroes are randomly selected and randomly placed in regions) in the beginning of the game that will work and not stop my map from loading? |
| 02-29-2004, 03:38 AM | #2 |
When you give them their hero check what type it is and display text depending on the type of unit placed. |
| 02-29-2004, 04:19 AM | #3 |
The map is legitamately freezing, and its not just that the load is going to a crawl, then it's almost definite that there's an infinite loop happening during the load. A good thing to remember is that "Map Initialization" events happen during the loading process, before you actually see the map appear. A possible loop, from what you stated, is that: everytime a unit enters a region, a unit is created in the region; hence, activating another unit entering that region, and creating -- and so forth and so on. If you're stumped and need a second pair of eyes, attach the map file to this thread. |
| 02-29-2004, 04:32 AM | #4 |
its not like that, nothing is activating another unit to be created, the create unit trigger works totally fine and is separate from the display text trigger, its just that i tried the Unit - A unit enters (Playable map area) because i dont know anyother way to display info for each specific hero the Unit - A unit enters (Playable map area) somewhat worked when i tried it on a small test map with only one Unit - A unit enters Playable map area (created the text i wanted for one specific hero that i create - unit with) instead of 42 its like this elasped time is 0.01 create hero(rnd) at start(rndm) for player 1 how would i check what type of hero it is and display text accordingly if it is like that when no hero is exactly defined? |
| 02-29-2004, 04:38 AM | #5 |
if unit is [blah] then do actions a: display [whatever] |
| 02-29-2004, 04:41 AM | #6 | |
Quote:
Use a Unit-Type comparison on the unit that you want to display the information about. For instance: Code:
Conditions: Unit-Type of (Entering Unit) Equal to Paladin |
| 02-29-2004, 04:45 AM | #7 |
Rae's method works if you want to create a separate trigger for each occurence... afaik, u could make it less work, and just have several if-then statements on a single trigger. If-thens are generally used if you wish to do/test multiple things in one trigger, like trigger-spells, I suppose. But yeah, both work. |
| 02-29-2004, 05:28 AM | #8 |
i am using a unit-type comparision Naga Sea witch Events Unit - A unit enters (Playable map area) Conditions (Unit-type of (Triggering unit)) Equal to Naga Sea witch Actions Game - Display You've for owner of triggering unit what should the event be? just a time elasped or what? is there a way i can keep the "display text triggers like the example above" separate from the "create unit triggers" so i only have to do 42 triggers (one for each of the heroes)? |
| 02-29-2004, 06:09 AM | #9 | |||
Quote:
right. Quote:
The events for what? Quote:
huh? |
| 02-29-2004, 06:00 PM | #10 |
so this is actually correct?? Naga Sea witch Events Unit - A unit enters (Playable map area) Conditions (Unit-type of (Triggering unit)) Equal to Naga Sea witch Actions Game - Display You've for owner of triggering unit i have that trigger 42 times (once for each hero) and thats what makes my map stop loading i never though of doing it this way Unit enters map Game - Text message: You have (conversion - convert unit type to string) but if i do it this way, i can only have the name, i cant put in extra info for each character like i want if that trigger above is correct, why does it cause my map to stop loading? (im sure its this, my map wont load, if i disable all 42hero triggers, the map will load) if there other way i can modify that trigger somehow so it works? o and when i asked before about how would i determine what hero it picked, i was referring to combining the display text action to immediatley follow the create unit action in the same trigger (which is sorta difficult because of the random variables but will save much space in triggers) EDIT: I have a idea!! would setting strings to each hero and then displaying one to the player work?? string --> string array stringint --> integer Unit - Create 1 hero[rnd] for (Picked player) at starts(rndm) Set - variable rnd = (stringint) Game - display text for 9 secs for controller player string(stringint) that should work right? but since the display text last for 9 secs, will that prevent immediatley following actions in the same trigger from occuring? or will the text display for 9 secs and the actions following will occur like normal? |
| 02-29-2004, 06:17 PM | #11 |
Instead of using the: Unit Enters Map Area Why not when you generate their unit type for them, check what type it is with an if and then display text and such accordingly. or if your not even going to give a description of the unit you could not even bother to check and simply display the unit's converted name... or you could make two different arrays and that would make for even less work. One array of units and the other of descriptions and match the numbers. EDIT: No, it won't stop other successive triggers from running unless you put in a wait action. |
