| Post 21 | New | Posted August 30th, 2005 |
|---|---|
| Pyro GTA2 Scripter & Mapper
| If you do DELETE_ITEM on the player, the entire game crashes. After all, you're effectively removing the player from the game! Ped and cop dummies automatically get removed when you go far enough off screen (not sure how far, perhaps at least 2 or 3 screen sizes away) and there's nothing you can do about it (I think). Yes, DELETE_ITEM on the dead character will work, although might look a bit wierd. Instead, you could try this (not sure if the brackets add up, I'm giving an example of an IF statement): Code: IF ( ( HAS_CHARACTER_DIED ( character ) ) AND ( NOT ( IS_ITEM_ONSCREEN ( character ) ) DELETE_ITEM ( character ) ENDIF This should check if the character named 'character' has died AND if he is off-screen, and if both are true, delete the character. This should make it a little neater Character respawn? I take it you are talking about the player since you can't respawn a created character (well, you can, just use the CREATE_CHAR again 30 = 1 second. So... 300 = 10 seconds... But not sure if this works in an IF statement though... Hope this helps a bit ------------------ ![]() Quote: "Side effects may include: dry mouth, nausea, vomiting, water retention, painful rectal itch, hallucination, dementia, psychosis, coma, death, and halitosis. Magic is not for everyone. Consult your doctor before use." Quote: "Sharper than one of Oscar Wilde's witticisms rolled up, dunked in lemon juice and stabbed in someones eye..." |
| Post 22 | New | Posted September 1st, 2005 |
|---|---|
Oliii
| Thank you very much you' ve helped so much. Could you please tell me what is pedzone( hmm sorry I mean general purpose ) mean ? What is it for? Thank you indeed. |
| Post 23 | New | Posted September 1st, 2005 |
|---|---|
| Pyro GTA2 Scripter & Mapper
| You're talking about zones... here's what it says from the map editor... GTA2 Map Editor Help wrote: General Purpose zones are used simply to mark an area so that it can be referred to by that name in mission scripts. Navigation zones are used to store the correct geographical names of areas within the city. When the player enters a new navigation zone, its name is displayed on screen. When a police radio message reports a crime, the enclosing navigation zone is used to describe the area. Every block in the city must be within some navigation zone. They can overlap, in which case the smaller area zone gets priority. It is not allowed for equally sized zones to overlap. The navigation zone names are not translated in foreign versions of the game ? they always have the same name. For large areas, the game appends North, South, etc. to the displayed name, so as to give the player a better idea of where he is. Traffic light zones are used to mark junctions where traffic lights are required. The game will automatically construct a traffic light system at each traffic light zone. It is not allowed to place a traffic light zone on an area which is not a valid junction. Traffic light zones must not be on slopes, and must not be within one block of the end of a slope. Traffic light zones must be at least a screen away from each other. Railway Station zones are used to mark the location of railway stations The platform zone marks where the platform is, i.e. where peds should stand. This must be adjacent to a valid train route. The stop point marks where trains should stop. The entry and exit points mark the points on the track where trains enter and exit the station. Bus Stop zones are used to mark the location of bus stops. The zone is placed on the pavement and it marks where the peds should stand. Buses will stop at the nearest road piece( error if none close ). There are no specific bus routes ? buses are simply created at random and stop at bus stops whenever they pass them. General Trigger zones are used to mark the position of general purpose triggers. These are used by mission scripts to set off an event when the player enters an area of the map. Normally, some sort of event will be associated with the general trigger zone in the mission script. Information zones are used to mark an area which has different information values from the area round about it. The actual information is set up using the mission script. Gang zones are used to mark the areas used by particular gangs. The name of the zone is the name of the gang. Any one gang may have many zones. Local Navigation zones are used, like navigation zones, to mark the names of places which the player can visit. Local navigation zones will tend to be smaller than main navigation zones. On-screen, the local navigation zone is shown before the main navigation zone ? e.g. ?Johnny?s Strip Club, Hackenslash? would be displayed if the player is in the local navigation zone ?Johnny?s Strip Club? and the main navigation zone ?Hackenslash?. The rules for overlapping for local navigation zones are the same as for main navigation zones. However, unlike main navigation zones, local navigation zones do not have to cover the whole city. Restart zones are the places where the player is restarted after he dies . There must be at least one restart zone in a map. They can be any size . When the player dies, he is restarted at the nearest restart zone ( except if it is a mult-player game and another player is too close ) . Arrest Restart zones mark the places where the player is taken to after he has been arrested. They must be only one block in size. Named zones in the city need not have different names to each other. However, it should be noted that there could be confusion when a mission script refers to a zone by name if that name is not unique. I haven't used a few of them before (such as Information zones, and General Trigger zones), so I don't really know what they do from testing. However, if you want to set up these zones for cars and ped values (density), you should use the following in your script: Code: MAP_ZONE name = ( cardensity , goodcarratio , bad car ratio , police car ratio , ped density , mugger ratio , car thief ratio , elvis ratio , gang char ratio , police ped ratio , gang car ratio) The details (as specified in the documentation) for this script are: Code: car density how busy the zone is for cars good car ratio ratio of ?good? quality models bad car ratio ratio of ?bad? below average quality models police car ratio the chance of getting a patrolling police car driving around as a dummy ped density how busy the zone is for characters mugger ratio frequency of mugger peds car thief ratio frequency of car thieves elvis ratio frequency of elvis peds gang char ratio frequency of getting random gang members police ped ratio frequency of getting a policeman walking around as a dummy gang car ratio frequency of getting a gang car generated Densities work in a range of 0 to 1000. 0 guarantees no cars/peds are created, 1000 means the game will attempt to make 2 cars each cycle, 3 peds. 500 means 1 car each cycle, approx 1 or 2 peds. Car Ratios: All car ratios must add up to 1000 and again work on a sort of percentage style. If you have a good car ratio of 100, then 1 time in 10, a good car will be created. If that ratio was 500, then 1 in 2 would be ?good?. On top of the ratios listed, there is an ?average car ratio? which is automatically calculated. Average ratio = 1000 - (goodcar ratio + badcar ratio + policecar ratio) Thus, if you want no average cars, make sure all other ratios add upto 1000. e.g. A high class neighbourhood with little crime: goodcar 600 badcar 0 policecar 300 (average thus 100) Or a rundown, crimeridden neighbourhood: goodcar 0 badcar 700 policecar 0 (average thus 300) Ped Ratios: Again, ped ratios work in a range of 0 to 1000, with all ratios adding up to a total of 1000 again. Each ratio is the ?chance? of getting a random ped in the zone of this occupation. This time, on top of the given ratios, there is a ?dummy ped? ratio, calculated by dummyped ratio = 1000 - ( muggers + car thieves + elvis + gangpeds + police peds ) This post is a bit long-winded, but covers everything about zones. Anything else - reply back ------------------ ![]() Quote: "Side effects may include: dry mouth, nausea, vomiting, water retention, painful rectal itch, hallucination, dementia, psychosis, coma, death, and halitosis. Magic is not for everyone. Consult your doctor before use." Quote: "Sharper than one of Oscar Wilde's witticisms rolled up, dunked in lemon juice and stabbed in someones eye..." |
| Post 24 | New | Posted September 1st, 2005. Updated September 1st, 2005 |
|---|---|
Oliii
| Thank you very much this long answer. All parts of it is nearly clear for me except one thing : I dont understand what the average car ratio means .(Maybe its my fault) Now I know what's zones for. Now lets have a try how these works. I will ask you if I get stuck with coding or else somewhere again. Thank you thats very kind of you. |
