UNN
Member-
Content Count
1767 -
Joined
-
Last visited
-
Medals
-
Medals
Everything posted by UNN
-
is there a way to lock and unlock cars with a code
UNN replied to apex130's topic in ARMA - MISSION EDITING & SCRIPTING
The lock command will not prevent a player from ordering his AI into the vehicle. The best way is: As Bratty says, call the Lock command on the server (or all clients?). But also add an event handler to the vehicle to kick any AI out, if they getin when it's locked. You could try and move a game logic into the vehicle. That way, the AI on all sides cannot enter the vehicle. Although one side effect of this is, if you try and order your AI into the vehicle with a point and click command. Instead of issuing the GetIn order, you issue an attack  command instead. There might be some way of fixing this, haven't had chance to try it out. -
SetVectorUp, SetVectorDir and 3D coords
UNN replied to UNN's topic in ARMA - MISSION EDITING & SCRIPTING
One of the books I have "Physics for Game Developers" by David M Bourg, has a section for modelling aircraft. From that, I can't see why you couldn't implement such a thing using the scripting language. The ARMA engine already handles things like collision detection. But there is a still a lot you would have to add yourself, like dynamic sounds and AI e.t.c Just as a couple of examples off the top of my head. Add to that how it would work in MP. I think at the end of the day, it's all the same maths? A matrix just offers a more flexible way of calculating it all, if you’re writing a system from scratch. Lol...Well that’s another side. In this case, it's my lack of natural aptitude when it comes to maths and probably not paying attention when I was at school It took a lot of, wading through numerous examples coupled with trial and error, to figure out something that at least worked. I'm sure there are other people on the forums, better qualified to answer these questions. -
SetVectorUp, SetVectorDir and 3D coords
UNN replied to UNN's topic in ARMA - MISSION EDITING & SCRIPTING
I'm no expert on the subject, but I did start implementing a Matrix solution a while back. It seemed a little long-winded for what I wanted to do. It might be due to the way BIS have laid out these commands. Perhaps you just don’t need to go that far? Cheers, I have a couple of books myself. Along with a few good web sites I found, so I'm ok on that front. It's not required. It probably helps organise the code and makes it look a little more professional. But the impression I got was, you were adding lots of code that would never really be used with those commands? The scripts I posted at the bottom of the first page should be enough, they just have to be combined into one function. Depending on how you want to implement them. I've not done any more work on them since. I don't have any use for them atm, since I shelved my original plans. For me, it required a lot of time and effort, to get as far as I did. -
You might find the new features for animations, still have their limits. Yet to see if you can now animate proxies and other default model selections as part of one big animation e.t.c But still a lot more you can do with them in Arma now. For your question about pitch and bank. There are some other commands that might help, not sure how successful it will be in MP. But there is this: SetVectorup & SetVectorDir
-
Well if it's for a one off mission then, just place one via the editor, some place out of the way. I was assuming you were writing a set of scripts to be used by anyone? But the worst you should expect from CreateVehicle, is a slight delay if there are no other Repair Trucks in the mission. As long as you ensure the vehicle is created only on the server. Then it should be ok? Just wrap the code around an: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">If IsServer Then     {     .....     }; If it's a problem with locality (the repair may have to be called localy if your using a User Action) then create the truck for each mechanic, at the begining of the mission. Apply the code I posted on the wiki, to ensure the newly created Truck is available to all clients. See Example 3 here: http://community.bistudio.com/wiki/setVehicleVarName Just give it a sensible, global variable name. There is no reason why you can't share the same repair truck with multiple players. But you could always create a truck for each player.
-
You might be able to CreateVehicle a repair truck, below ground out of the way. Then use the Action command Repair: From the wiki: Vehiclename will receive weapons/fuel/repair from 'vehicle2' immediately and via teleportation. Then once it reaches 0% damage, just delete the truck and assign your 40% damage.
-
Actualy there are a few other things that don't look right. Perhaps if you posted some details on what you're trying to do?
-
All static objects with ladders inherit from class House, not class building.
-
Edit: Sorry, did not relaise this was such an old post.
-
I already understand the severity of disabling user input of the misson admin. But that command is for lame hackers who do not understand how to truly use a game engine, to gain their objectives. Think of them as ant’s, there is a great big Queen leading a lot of drones.
-
Forget about the diableUserInput command. That would only stop the most basic, of mission hackers, although I'm sure the majority of the KFC lot are at that level. After all they are just sheep, demented sheep, but sheep none the less That command can be easily duplicated (if you know what your doing), there are others ways of getting the same result. But it's not like they have the monopoly on scripting. I suspect all the KFC lot, fall well short of genuine scripters. Otherwise they would have better things to do with their time
-
Well a lot depends on how much time Nutty_101 has to add functionality, not to mention the load it might put on the game\server. In some cases you probably can't, at least without laying down some rules for MP mission makers before hand and being able to configure sets, of complex rules for the firewall. In other cases it could be quite effective. The simpler the mission, the easier it will be to police. But for example; If you know that in a certain mission, CreateVehicle is only every used on the server, or perhaps never used at all. Then you can add a check to react to clients calling that command. It will be most effective when used by an Admin, who will know straight away, if something looks wrong. It won't stop people from trying to cheat or stop every single cheat. But at least you know exactly who they are and you could prevent some of the more harmful cheats and hacks from ever happening.
-
Yeah, now you mention it. I'm sure thats what he ment. I was reading an old troubleShooting thread about the Arma CD keys authentication server. But obviously, thats a different server than a Gamers server...Doh! @Nutty Thinking about it a bit more. Would it also be possible to setup some sort of auto kick function? So if anything was detected that should not be in the mission, you could fire off some scripts. Don't now anything about the new server side scripting, so I'm not sure if you can use loadfile with it. I'm sure you can Â
-
It's probably better to remove that bit? It could be abused. Is it possible to add the ProcessInitCommands to the list to? Or at least, whatever is sent across the network by calling it.
-
<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">if (_nObject = nearestObject [Player, "Helicopter"]) then     {     Pilot1 assignAsCargo _nObject;     Pilot2 assignAsCargo _nObject;     [Pilot1] orderGetIn true;     _Pos = position PilotLounge;     Pilot1 move _Pos;     }     else     {     if (_nObject = nearestObject [Player, "car"]) then         {         Pilot1 assignAsCargo _nObject;         Pilot2 assignAsCargo _nObject;         [Pilot1] orderGetIn true;         _Pos = position PilotLounge;         Pilot1 move _Pos;         }         else         {         if (_nObject = nearestObject [Player, "Tank"]) then             {             Pilot1 assignAsCargo _nObject;             Pilot2 assignAsCargo _nObject;             [Pilot1] orderGetIn true;             _Pos = position PilotLounge;             Pilot1 move _Pos;             };         };     }; I reformatted the example with indents, makes it a bit easier to read. Just do a search and replace across your script, swapping tab's for eight spaces, when posting code on the forum. I also noticed you had mixed global and local variables for Pilot1 & _Pilot1. So I changed them all to global. As I said in a similar thread, which was completly ignored. The best way to figure it out, is with a bit of basic debugging. If a chunck of code is giving you problrms, them simplify it. Start with: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">if (_nObject = nearestObject [Player, "Helicopter"]) then     {     Pilot1 assignAsCargo _nObject;     Pilot2 assignAsCargo _nObject;     [Pilot1] orderGetIn true;     _Pos = position PilotLounge;     Pilot1 move _Pos;     }     else     {     }; If you get the same error, then you only need to worry about a third of your script. If that works ok, then add: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">if (_nObject = nearestObject [Player, "Helicopter"]) then     {     Pilot1 assignAsCargo _nObject;     Pilot2 assignAsCargo _nObject;     [Pilot1] orderGetIn true;     _Pos = position PilotLounge;     Pilot1 move _Pos;     }     else     {     if (_nObject = nearestObject [Player, "car"]) then         {         Pilot1 assignAsCargo _nObject;         Pilot2 assignAsCargo _nObject;         [Pilot1] orderGetIn true;         _Pos = position PilotLounge;         Pilot1 move _Pos;         }         else         {         };     }; And so on... I know it's tempting to get other people to figure it out (not so much you). But in the long run, you will save yourself so much more time, if you can quickly track down problems as soon as they arise.
-
Don't know if you did a cut & paste from your script, for the example you posted. But it should be: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">else Not <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">esle
-
init eventhandler doesn't work?
UNN replied to sakura_chan's topic in ARMA - MISSION EDITING & SCRIPTING
The init event, assigned with the script commands for units. Only fires when the unit gets out of a vehicle. Not when it's re-spawned. I've never played around with re-spawn scripts, so perhaps check out how others have done it? -
Try it with just: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">While {True} Do     {     Sleep 0.1;     }; If thats ok, add the rest of the code a bit at a time.
-
We have found possible solutions for both problems. Along with half a dozen, other strange and obscure things, that have cropped up in Arma But for the two we mentioned: -Preventing the Stryker and other unsuitable objects, from being loaded. -The glitch with drawing objects inside and independant of, transport vehicles. They are not ideal solutions. For example, we can physicaly prevent the BIS Stryker from gaining access to the cargo bay. Also both fixes will need to be implemented by addon makers themselves. If they want to be able to drive vehicles into the back of their own addons. It's not something we can fix automaticaly, as it requires additional objects to be made for each addon. We have yet to decied if the C-130 and other RKSL addons will implement these fixes. For us, the main priority is just moving cargo around the map. But I will certainly add the functionality into the cargo system, for those that do.
-
In theory yes, you can make it slightly harder for a mission hacker to do that. But that’s about it. If you don't want to drastically reduce the functionality of mission editing and scripting in Arma, then BIS need to beef up the functionality of Server Side scripting. The reason why Arma appears to be more vulnerable to hackers compared to OFP, is because, it now offers much more powerful options for genuine mission makers and scripters. But this also leads to abuse
-
Lol…These people would have a guaranteed career in Pantomime in the UK. It’s not that they pursue cheats because of sociopathic tendencies,  it’s because they are forced to by others I think certain people should try and resist, being their mouthpiece.
-
As a quick test, you could try this: For the vehicle and West group in question, run this script at the start of the mission: RevealDead.sqf: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_Vehicle=Vehicle (_This Select 0); _EnemyGroup=_This Select 1; WaitUntil     {     ({Alive _x} Count (Crew _Vehicle)==0)     }; {_x Reveal _Vehicle} ForEach (Units _EnemyGroup); With whatever you called the UAZ and second West group via the mission editor, in init.sqf or init.sqs add this line: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">[MYUAZ,MY2ndWESTGROUP] ExecVM "RevealDead.sqf"; You can probably get away with just naming the leader of the West group "MY2ndWESTGROUP". P.S From the quick test I posted before, I think this could be classed as a bug. I just can't see why an AI under the players command, should act in such an obsessive way? Compared to one acting independently.
-
Well I only did a quick test with myself and a single AI, against a single UAZ. So a couple of things to take into account I guess: The target is visible from the start as it's only 50m away. There is only one AI unit, so no worries with AI lag. Given the above, the results were consistent. If the second group are the only ones firing at the empty vehicle. It might be worth using the reval command, to reveal the empty vehicle to each unit in the second group. Once all the crew are dead?
-
I just did a couple of quick tests. Oddly enough it only appears to be a problem with AI under your command. An AI soldier ungrouped will stop firing as soon as the driver is dead. However, as soon as you group him as a subordinate to the player, he will happily empty all his mags into it. The only way I could stop this. Was to give him a cease-fire order and reveal the vehicle with the dead driver. Then tell him to open fire again. After that he would not fire at the empty vehicle. You could probably script something into a mission to automatically do this, but not sure how successful it would be.
-
It is close to the inital stage. I always planned on releasing a basic Multiplayer Beta (Addon & Script) for the first version, probably with limited support for the default BIS Cargo and Transport. It all depends on the time, but Single Player save game support with extra features will follow after that. Yep, looking forward to getting my hands on some of these when Rocks finished with the config.