Jump to content
Sign in to follow this  
BomboBombom

[req. help] Scripting random respawns for npcs and static respawns for vehicles

Recommended Posts

* req. = require.

Hello there to everyone, I'm fairly new to the scripting but have been attempting to do quite a few things over the night using script that I found searching both here and in other areas.

I've managed to make a few things work but almost nothing as I want it to work.

I've got;

- Weapon crates with all available weapons, these are supposed to recharge every 5 minutes. I do believe they do, in either case there are 30 of each weapon so I do not mind.

- Vehicles that respawn, but they respawn if you drive them out of their original location and leave the vehicle for x-seconds. I only want respawns if all passangers die or the vehicle is completely destroyed.

- Units that patrol around their spawned areas. They work fine for their purpose but they won't respawn as the script maker says they should. I've lowered the "safe-range" as well as the respawn timer to 5 sec to try it out. (after a closer look I partly figured how to spawn them units, however the script bugs out somewhere and some of the spawns stop working eventually and still random model/pistol etc remains)

# Trying to get vehicles to respawn as explained above, not simply since there is no longer anyone in them. Unmanned vehicles could respawn 120 sec if the driver is x-meters from it, thus assuming it is no longer loved and respawns back home to start a new life.

# Trying to get unit groups to respawn about 45 sec after all members have been taken out. Would like single unit respawn script, but this could be annoying. However their purpose is simply to be resistance as you are being chased by an chopper.

# A wishful thought. If and when I got units to work I wanted to make it so that units would randomly spawn within a certain range of where a player is currently located, also only at houses of any sort in groups of 1 to #whateveriplease units. Equiped with a set inventory or from an array at random pick. Atm all units are only allowed 1911s as I do not want them wearing heavy duty AKMs.

# About mission #

The mission I'm trying to poke is a mission where 2 or more people spawn far up on the Chernarus-map and one spawns on an airfield with gun-mounted choppers which he will use to attempt to chase down the players.

The players at the top of the map need to get to either of the biggest towns on the map without dieing. They are allowed to fire at the chopper, but only have a limited choice of light weapons.

On their way down they will run into pistol armed resistance attempting to slow them down or even kill them, but stopping in towns can be rewarding as there can be gun-mounted pickups or new weapons and ammo.

# What I've done, used and tested so far #

*ammo crates script link (not allowed) - Works fairly well, not as initially explained but eventually.

* house patrol script (link not allowed) - These worked right of the bat pretty much. Not really "patrolling" that much, but moving around well enough for their purpose.

* Simple-Vehicle-Respawn-Script - The script is explained in the post. I've not found a better alternative, probably missed it.

* kronzky homepage - Patrol. Respawn script.. Not sure where it is.

* Other than that I'm using the description.ext for basic respawns, the only problem with that is that it re-equips respawned npcs with too heavy artillery. Want to be bare and use the crates to equip myself. (except the crates will be cleared and filled with light weapons once map works as it should)

* Funny how while writing this respawn started working.. After some tweaks quite good. But the random function doesn't work.

- Sorry for not posting code. Not sure if it is ok posting the sources to the creators sqf-files. However kronzky did have a vehicle spawner, but one for manned spawns. Not unmanned.

I've used -showScriptErrors or w/e it is and it doesn't report errors.

Additionally with the latest beta patch all explosives, exploding or not, crashes the entire client for me. Fired from choppers or any other vehicle crashes me. :|

Cheers. (starting to pass out, will post)

Share this post


Link to post
Share on other sites
* req. = require.

Hello there to everyone, I'm fairly new to the scripting but have been attempting to do quite a few things over the night using script that I found searching both here and in other areas.

I've managed to make a few things work but almost nothing as I want it to work.

I've got;

- Weapon crates with all available weapons, these are supposed to recharge every 5 minutes. I do believe they do, in either case there are 30 of each weapon so I do not mind.

- Vehicles that respawn, but they respawn if you drive them out of their original location and leave the vehicle for x-seconds. I only want respawns if all passangers die or the vehicle is completely destroyed.

- Units that patrol around their spawned areas. They work fine for their purpose but they won't respawn as the script maker says they should. I've lowered the "safe-range" as well as the respawn timer to 5 sec to try it out. (after a closer look I partly figured how to spawn them units, however the script bugs out somewhere and some of the spawns stop working eventually and still random model/pistol etc remains)

# Trying to get vehicles to respawn as explained above, not simply since there is no longer anyone in them. Unmanned vehicles could respawn 120 sec if the driver is x-meters from it, thus assuming it is no longer loved and respawns back home to start a new life.

# Trying to get unit groups to respawn about 45 sec after all members have been taken out. Would like single unit respawn script, but this could be annoying. However their purpose is simply to be resistance as you are being chased by an chopper.

# A wishful thought. If and when I got units to work I wanted to make it so that units would randomly spawn within a certain range of where a player is currently located, also only at houses of any sort in groups of 1 to #whateveriplease units. Equiped with a set inventory or from an array at random pick. Atm all units are only allowed 1911s as I do not want them wearing heavy duty AKMs.

# About mission #

The mission I'm trying to poke is a mission where 2 or more people spawn far up on the Chernarus-map and one spawns on an airfield with gun-mounted choppers which he will use to attempt to chase down the players.

The players at the top of the map need to get to either of the biggest towns on the map without dieing. They are allowed to fire at the chopper, but only have a limited choice of light weapons.

On their way down they will run into pistol armed resistance attempting to slow them down or even kill them, but stopping in towns can be rewarding as there can be gun-mounted pickups or new weapons and ammo.

# What I've done, used and tested so far #

*ammo crates script link (not allowed) - Works fairly well, not as initially explained but eventually.

* house patrol script (link not allowed) - These worked right of the bat pretty much. Not really "patrolling" that much, but moving around well enough for their purpose.

* Simple-Vehicle-Respawn-Script - The script is explained in the post. I've not found a better alternative, probably missed it.

* kronzky homepage - Patrol. Respawn script.. Not sure where it is.

* Other than that I'm using the description.ext for basic respawns, the only problem with that is that it re-equips respawned npcs with too heavy artillery. Want to be bare and use the crates to equip myself. (except the crates will be cleared and filled with light weapons once map works as it should)

* Funny how while writing this respawn started working.. After some tweaks quite good. But the random function doesn't work.

- Sorry for not posting code. Not sure if it is ok posting the sources to the creators sqf-files. However kronzky did have a vehicle spawner, but one for manned spawns. Not unmanned.

I've used -showScriptErrors or w/e it is and it doesn't report errors.

Additionally with the latest beta patch all explosives, exploding or not, crashes the entire client for me. Fired from choppers or any other vehicle crashes me. :|

Cheers. (starting to pass out, will post)

Hello!

Well lets start this lil journey...

1.- ALL WEPS: http://www.armaholic.com/page.php?id=11174

2.- SIMPLE VEHICLE RESPAWN http://www.armaholic.com/page.php?id=6080

3.- KRONZKY UPS http://www.armaholic.com/page.php?id=6053

Suggestions:

Read each one of the README files or the scripts themselves. E.G. Tophe's SVR doesn't have a readme but he managed to explain the script on some lines in it.

Using Kronzky UPS, you can have a simple but dynamic environment with some limitations, like the ai's wont respawn. Once you are familiarized with Kronzky, you could try then Monsada (UPSMON).

There's another script from Norrin which involves the respawning thing to an AI unit once it dies and adds the Urban Patrol Script from Kronzky in this link http://www.armaholic.com/page.php?id=6540.

Hope this can help ya.

Best Regards

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×