Jump to content

Psycho1

Member
  • Content Count

    177
  • Joined

  • Last visited

  • Medals

Everything posted by Psycho1

  1. Still can't find why the sounds aren't working:(
  2. I'm using Karrillion's vehicle respawn scripts, and I wanted to create a public variable that equals one of the local variables in the script. The reason I want to is because I need to use the variable in a trigger. This is what I tried: </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">_armortypelist=["Bradley","BMP2","M1Abrams","T80"] _boattypelist=["BoatE","BoatW"] _vehicletypelist=_vehicletypelist+_armortypelist+_boattypelist armor = _armortypelist PublicVariable "armor"<span id='postcolor'> The reason I did it that way is because I just looked at a C&H scoring script that had a public variable, and that's how they did it and it works. But when I try this method out, I get "expected Bool" when I run the mission, and it shows "armor=_armortypelist" right before it says "expected Bool". I left out the "PublicVariable armor" and the same thing happens.
  3. Oh man, that is a bummer:( What I did was make an actual bridge using the building "housegaraz_bez_tanku". I adjusted the z values for each one so that they were perfectly aligned and just the top part showed up above the water. It really does look like a bridge, and infantry can move across it no problem. But if a tank tries to go on it, it bounces all over:( That's why I wanted to adjust the z values of the tanks when it was over the bridge. The tank bouncing isn't that bad though, I just might be able to get by with it.
  4. I just tested it and it seems to work almost the way I want it to. The problem is that it will add the 2 meters to the tanks z value for a brief second...than it will drop back to the ground even if it is still in the trigger area. I want to maintain that z value + 2 at all times if it is in the trigger area. You might be asking why I want to have tanks floating above ground.....they won't actually appear to be floating above ground, I want to make it look like the tank is traveling over an object....but without the adjusted z value, the tank will bounce around on the object. So I want to create the illusion that the tank is traveling over the object, having it hover just slightly over the object. I am so very close to getting this task done, all I need to do is have the trigger adjust the z value at all times for the tank if it is within the trigger area.
  5. Well, I got the condition field working the way I want it to. The reason I can tell is because when I enter the trigger defined area with a tank, I get an error message about my activation field. The good news is that all my tanks are being detected by the trigger. In the activation field, I put: </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">this setpos [(getpos this select 0), (getpos this select 1), (getpos this select 2)+ 2]<span id='postcolor'> and I tried it with the variable "tanks" in place of "this" too....both give me the same error message...."Error type Bool, expected Object". How is that interpreted as a true or false statement when all it is doing is getting the x,y,z values of the tank and adding 2 to the z value? I fail to see why it thinks it is a Bool statement. Other than the activation field, it is detecting the tanks for both East and West the way I want it to. Now if I can fix up the activation field, hopefully I can get my task accomplished.
  6. I made a trigger with: </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">"tank" countType thislist<span id='postcolor'> as the condition, and I get this error message: "Error type number, expected Bool." Bool meaning true or false right?.....doesn't everything have to be true or false for the condition than? How would "tank" countType thislist work in the Condition field?
  7. Detecting the position of the tanks relative an object is a pain in the ass for what I'm trying to do. The x value is easy, but the yval is gonna be a real pain. I want the script to activate when the tanks are within a very long but not wide rectangular zone. If I have the script activate if it is within a certain yvalue + whatever, it will only work if it is exactly north or south of the invisibleh(I think). I hope I'm being clear, I'm tring to at least, but it's hard to explain, hehe. For the triggers in the mission.sqm, it uses this to determine the boundaries of the trigger: </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">position[]={7893.171387,37.892941,3746.503662}; a=270.000000; b=450.000000;<span id='postcolor'> Now.....does the a=270 mean the position x value + 270 and x value - 270 to create the up to down lines(boundaries) of the trigger area? And b=450 means y value + 450 and yvalue - 450 to create the left to right boundaries? Couldn't I use these numbers in a script to pretty much replicate the way an area is defined for a trigger in the mission editor? Than use if then statements to see if _vcl is within the area of the replicated trigger? I'm stumped on how to exactly do it though:(
  8. I tried that vcl in thislist and I got error type bool, expected object. Â I guess I'll try a script to get it to work. Â I've only just started messing with scripts, so I'll need some help doing it though. Â I'll need to use both x and y values I guess because the area I want the tank affected by the action is pretty strict. Â Here is how I would start it out: </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">_Object=_this select 0 _xval=Getpos _Object this select 0 _yval=Getpos _Object this select 1 _zval=Getpos _Object this select 2 _invisiblehxval=Getpos invisibleh this select 0 _invisiblehyval=Getpos invisibleh this select 1 #start ?(_xval < _invisiblehxval + 5) and ?(_yval < _invislbehyval + 5)or ?(_xval < _invisibleh - 5) and ?(_yval < _invisiblehyval - 5) : Goto "actions" Goto "start" #actions this setpos _Object [(getpos this select 0), (getpos this select 1), (getpos this select 2)+ 2] Goto "start"<span id='postcolor'> I know I have made some errros wit hthat script, plz let me know what you can find in it. Â The invisibleh public variable is the name of the invisibleh. I'm pretty sure I made an error with those and or commands. I don't know if you can group them all together like that. What I was trying to do is have it goto actions if either 2 sets of instructions worked out. If I need to be more clear, let me know.
  9. Are you sure I can't get this to work using a trigger? It would have been very convenient if you could enter variables for the activated by field. Couldn't I get it to work if I put something to the affect of "vcl2 inarea" for the Condition field. That's not the correct syntax you would use, just trying to get you to see what I mean. Is it possible to enter something like that in the Condition field?
  10. I jumped the gun:( It wasn't the script causing the error, it was the trigger. I thought it was fixed since I didn't get that expected bool thing, but when I put the trigger back in I got the same message:( The variables are okay, it's just the trigger I'm messing up. I scratched out the tanks variable because that would select all tanks. I want the trigger to execute only on a tank if it goes in a specific trigger defined area. So I grabbed the local variable _vcl(which wouldn't group all vehicles together) and declared a public variable "vcl2" that equaled it. Here is the important stuff I put in the trigger: </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE"> activationBy="ANY"; repeating=1; age="UNKNOWN"; expCond="vcl2";---this is wrong-I get the message "error type object, expected Bool" expActiv="this setpos [(getpos this select 0), (getpos this select 1), (getpos this select 2)+ 2]"; class Effects { }; synchronizations[]={};<span id='postcolor'>
  11. You were right, I replaced "armor" with the name "tanks" and it works just fine. Thanks again.
  12. LOL, I'm pretty sure I caught my error....I didn't notice it till right after I posted that last message. Â As you can tell, I don't have the _ before damage for the part that jumps to destroyed, so that could very well be the only problem I made. EDIT: Just went and checked it out. It works exactly the way I want it now, hate it when I mess things up with such a small error, hehe.
  13. Okay, I have a working script that will set a buildings damage back to 0 after it is blown up, but I want to have the building's damage set back to 0 after every hit it takes. Â I don't want the building to blow up, that's why I want to set the damage back to 0 right away. Â Here is what I tried to do: </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">?!(local Server): Goto "end" _building = _this select 0 #start ~0 ?(_building dammage == 0):goto "start" _building setdammage 0 Goto "start" #end exit<span id='postcolor'> My problem is at: Â ?(_building dammage == 0):goto "start" dammage isn't the operator I'm looking for, and I tried setdammage as well. Â I looked around but can't find any operator for the damage that a vehicle/building has. Â If anyone knows what I need to put in there, plz let me know. I do realize buildings can get wiped out with 1 hit from tanks, but I still want the building to keep from blowing up for as long as possible. By the way, that script is Karrillion's creation, I just modifed it a bit.
  14. I'm running into a problem if the building is blown up after only 1 hit. I was sort of expecting it, and I've modified the script to try and fix it. I was almost positive it would work, but the destroyed building would still just sit there:( The reason their is a problem is because I have no delay before it sets the damage back to 0. That works unless for example an M1A1 hits the building with sabot. It goes down immediately, and with no delay, it can't set the damage back because it's still in it's blowing up routine I think. It would work if I have a delay of 20 seconds if the building blows up, so here is what I did: </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">?!(local Server): Goto "end" _building = _this select 0 #start ~0 _damage= getDammage _building ?(_damage == 0):goto "start" ?(damage == 1):goto "destroyed" _building setdammage 0 Goto "start" #destroyed ~20 _building setdammage 0 Goto "start" #end exit<span id='postcolor'> I was pretty sure it would work since I have the script jump to a section where the delay is 20 if the building is at a damage of 1, but it doesn't. Any help is greatly appreciated.
  15. I got it from Karrillion, he posted it here a few weeks ago.
  16. Thx, I got it figured out once I knew how to get the damage of the building. Here is the working script: </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">?!(local Server): Goto "end" _building = _this select 0 #start ~0 _damage= getDammage _building ?(_damage == 0):goto "start" _building setdammage 0 Goto "start" #end exit<span id='postcolor'>
  17. Psycho1

    Modified config file on stock install

    That might not be the problem. Â I got that modified config file message too (on V1.42) even though I had no addons whatsoever. Â The server I was playing on didn't have any addons installed on it either, or else a lot more people would have been getting that message. Â When I installed the 1.46 patch, the problem went away immediately, and I have not gotten that modified config message ever since. Â I still don't know why I got that message before......it must not have been checking the config file accurately; Suma said they were hoping to get a fix for it in the 1.46 patch and it sure looks like they fixed whatever was causing my problem...or else why would it dissapear immediately with V1.46. I had totally uninstalled OFP before and the message still showed up....but right when I patched to 1.46, it dissapeared, and I had not uninstalled before patching to 1.46. Forgot to add: I always play on the same server, and I had just recently got that modified config file message before I patched to 1.46. Never got the message again with V1.46, that's why I'm 99% sure it wasn't a problem with the server having any addons. More people would have been getting the modified config message too if the server had any addons.
  18. Psycho1

    Z values

    I've been trying to change the Z values in the mission.sqm to no avail. Â The values go in the order X,Y,Z right? Â The reason I want to modify Z values is because I have a building in my map that is not on flat ground, one corner is barely sticking out over the ground, letting you see under it. Â I lowered the 3rd value for the building by 20 and I still can't tell any difference from before, and I made sure I saved the changes in the mission.sqm. Â I went and lowered it by over 100(making sure to save)..still no difference. Â I've seen people put flags on top of castles, etc., so you must be able to modify Z values. I went and took another look at the mission.sqm tutorial at OFPeditingcenter and they list the values going in the usual order of x, y, z, so I must have been modifying the right value. Â It also has in parenthesis after z "(only if flying)". Â Every single object, flying or not, has a 3rd value which has to be the Z value right? I'm getting frsutrated, hehe.
  19. Psycho1

    Z values

    I set the z value to 0.000000, previewed the mission, than went back into mission.sqm and put it to 15.000000 and didn't see a difference either time.
  20. Psycho1

    Z values

    Yeah, that's what I've been changing. Like if the position was: position[]={5465.086914,484.520630,6200.223145}; and I wanted to raise the Z value, I would change it to: position[]={5465.086914,500.520630,6200.223145}; But I do not see any difference when I test the mission after changing the value. The object is in the same exact place still. I've changed it by over 300+, still no difference. I go back to the mission.sqm....and the value is still the way I modified it though.
  21. Psycho1

    Z values

    Shadow, when I lower the second value it does not do anything...even if I change it by over 100...and yes, I remembered to save.
  22. Psycho1

    Z values

    I just tried that method and it doesn't work, I'm probably far off:( lol
  23. Psycho1

    Z values

    By the way, I got that code from a camera script I use for an intro. It does work to get the camera a specific height over the object being targeted by the camera. Just modified the script a little since it seems to do what I want.....change the z value....but instead of changing the z value of the camera, it should change the z value of the building...IF I did it correctly.
  24. Psycho1

    Z values

    I did remember changing either the 1st or 2nd value and it did move like it was the Y value. Maybe you have to do something funky to the z value to adjust it in the mission.sqm. Would this script work to adjust the Z value of the object? script named "zvalue.sqs" </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _Object=_this select 0 _xval=getpos _Object select 0 _yval=getpos _Object select 1 _zval=getpos _Object select 2 _zadjustment=[_xval,_yval,_zval+5] <span id='postcolor'> Than put in the init field of the object [] exec "zvalue.sqs" If that script works right, I attempted to raise the Z value by 5, but I bet I did something wrong.
  25. I have three weather/time combos I'd like to have chosen at random for my MP map. Is it possible to do that? If you could choose the likelihood of a time/weather condition showing up that would be even better. I went to the OFP editing center and looked at their mission.sqm tutorial, but they don't mention if that's possible or not. I hope it is:) Kinda get tired of always playing in a nice, clear blue sky, hehe.
×