Wadmann
Member-
Content Count
122 -
Joined
-
Last visited
-
Medals
Community Reputation
0 NeutralAbout Wadmann
-
Rank
Sergeant
-
I am getting an error with a mission that previously worked with the new Oman,Navals,Vityaz, ect units (just to see what they all looked like) but with the old Motorized Inf. units. Now after installing the new 3.0 Mot. Inf. units, I get the following error when I attempt to use the mission: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">Error Loading rhs_rfmi\rhs_garr03.p3d (Magic) Any idea what is causing this error? Thanks in advance. Wadmann
-
Great job e! I recently started using Tonal again and have been having a blast playing some old missions. I really look forward to the new version. One (or two) question(s) though. Will it be a mod folder conversion so that one could play either a jungle or brush version (not both at same time)? Â Or will it modify the original pbos? Probably too late to do much good, but just let me know if you need any camo pattern scans. Nothing really new, but I do have a few unpublished patterns so feel free to ask. Wadmann
-
createUnit does not work properly
Wadmann replied to MulleDK13's topic in OFP : MISSION EDITING & SCRIPTING
To solve your original issue, you can use a function (.sqf) by Backoff that will return the new object ID. Use it just like you would for createunit. See below: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">//createUnit2 v 1.0 //By Backoff (michael@backoff.ch) //This function does the same as createUnit but it will return the new object id. //usage: //place the sqf file in your mission folder and add this line in your init.sqs: //'createUnit2 = preprocessfile "createUnit2.sqf"' _private = ["_class","_pos","_group","_init","_skill","_rank","_index","_return"]; _class = _this select 0; _pos = _this select 1; _group = _this select 2; _index = count units _group; _return = false; if(count _this > 3)then { _class createUnit [_pos,_group,_this select 3,_this select 4,_this select 5]; } else { _class createUnit [_pos,_group,"",0.5,"PRIVATE"]; }; if(_index < 12)then { _return = (units _group) select ((count units _group) -1); }; _return; Example (in script): _reb1 = ["SoldierWB",getpos object 1, group reb1] call createUnit2 Hope that this helps. Wadmann -
Not an expert on the subject but I may be able to help some. A couple of things I noticed in your script. First of all, I did not see where you make onMap true so the script stops there (unless it is set to "True" elsewhere). <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">onMapSingleClick {Resgrp move _pos; leader Resgrp sidechat "Black Eagle Moving on"; gl_Resgrp setPos {a = (_pos select 0); b = (_pos select 1); clicked = true"publicVariable _x" forEach [a,b,onMapSingleClick]} I also noticed that there is not a ";" between clicked = true and "publicVariable _x" forEach [a,b,onMapSingleClick] but these are not your only issues. Where is the movement commands to make the group goto their destination? Below is code from a script that I use to move units to a marker. Works in MP but the darn markers do not move to the new position on each players screen. Never was able to fix that but look and see how this works. I did not make the script, only adapted two different scripts from the (old) OPEC site. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">a=0 b=0 clicked = false onMapSingleClick {a = (_pos select 0); b = (_pos select 1); clicked = true; publicvariable "a"; publicvariable "b"; publicvariable "clicked"} Â @clicked onMapSingleClick {} _pos = [a,b] "Alphapoint" setMarkerPos _pos [Alphagroup,"Alphapoint"]exec "Goto.sqs" exit And the "goto.sqs": <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">group1=group (_this select 0) _marker=1 _marpos=_this select _marker units group1 commandmove getmarkerpos _marpos; Exit The original author used more lines of code than needed in the "goto.sqs" but I never bothered to clean it up as it worked well enought at the time. It should also work like this: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">group1=group (_this select 0) _marpos=_this select 1 units group1 commandmove getmarkerpos _marpos; Exit Hope that this helps you some. Wadmann
-
error message on screen, why?
Wadmann replied to william1's topic in OFP : MISSION EDITING & SCRIPTING
I believe that you may be speaking of Chris Henderson's OFP Script Editor. It is available here. Great tool as it really helps to spot/prevent frustrating typos and contains all commands, weapons, and ammo. Even includes a few simple scripts that you can use and learn by when just getting into OFP scripting. Wadmann -
Respawning Soldiers Question
Wadmann replied to demonhunter212's topic in OFP : MISSION EDITING & SCRIPTING
Isn't that what one of the demo missions that Nagual made for (and IIRC came with) Tonal did? Basically, three or so groups attack you and as you killed them they respawned three times. Take a look in the Tonal D/L for the mission. If you cannot find it (and actually want it), lemme know and I will track it down and send it to you. Wadmann -
The command reference is available in a sticky topic in the scripting forum. D/L Link: Here or Here View Link: Here As for getting units to look in a certain direction, I usually have a unit dowatch an object ID # of a bush or tree or house that is in the general direction that I want the unit to face. If this will not work for your situation or you want the unit to scan, try a naming a game logic, give it some waypoints and have the units watch it. Wadmann
-
Here are few tips: 1) Read the readme for either the island or the baracken addon. I know that the info is in the baracken addon. 2) Use the search button. 3) Go to Mapfact and search/ask. For an answer [if you are talking about the Baracken\ Fence Barbedwire 6m (With gate left)-(Keep out)]: Open <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">this animate ["Component02", 1] or <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">object ID animate ["Component02", 1] Close <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">this animate ["Component02", 0] or <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">object ID animate ["Component02", 0] You can place the codes above in a trigger and with the right conditions, get it to open and close whenever a unit approaches/leaves the gate/barrier. Wadmann
-
That is what I get for posting too early in the morning. I realized my error this morning that it would not check the result of the action, only the fact that the action has been added. Sorry if I led you down a dead end path but you did seem to spot my error rather quickly. I thought that I had seen something similar at OFPEC. Search their site for a possible answer when thay are back online. Wadmann
-
You can set a variable after you activate the action and then check for the variable condition like so: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">Player Action ["weapononback"]; gunonback = true; publicvariable "gunonback" Then check for "gunonback" in script or trigger. Wadmann
-
How to get AI Sniper kill certain unit
Wadmann replied to killacom's topic in OFP : MISSION EDITING & SCRIPTING
As for the trigger activation, that is up to you and the mission requirements. Once you have that figured out, do the following: 1) Name sniper and officer (eg "es1" & "wo1" without the "") 2) In "on Activation" line of the trigger, add the following: es1 dotarget wo1; es1 dofire wo1 3) Activate the trigger for one dead officer, providing he is in range and sniper has LOS on him Wadmann -
garnett21a, Email sent with script attached. Enjoy! Wadmann
-
One note on grouping East and West players together: Make sure that the unit of the side that you want the group to become is of a higher rank than the highest ranking unit in the group. Or: For side = East, East unit must outrank all West units in group. Â For side = West, West unit must outrank all East units in group. Wadmann
-
All units triggering a trigger
Wadmann replied to Benny Moore's topic in OFP : MISSION EDITING & SCRIPTING
Hmmm.....As I am not at my PC and have not been editing as much as I would like as of late, I may be a little foggy on this one but did you try adding "units" into your line like so: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">handgrenade="handgrenade"; "_x removemagazines handgrenade" foreach units thislist I will check back tonight when I am at home and have some time and if this does not work, I will find an example of the correct code. Wadmann -
creating object at crosshair
Wadmann replied to Nick225's topic in OFP : MISSION EDITING & SCRIPTING
For a flare: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_i = "whatever you want" createvehicle [_xpos,_ypos,0] Replace "whatever you want" with "Flare" (or "FlareGreen", "FlareRed", "FlareYellow"). For a bright flash, perhaps use a "white screen" and fade back in, kind of like (or how?) ECP 1.085 did it using the "cutText" command: cutText ["", "WHITE OUT"] then cutText ["", "WHITE IN",4] Above syntax not guaranteed nor is the premise sound or tested (I may have the "OUT" and "IN" reversed). Â Â If it does not work, or is not exactly what you are looking for, I am afraid that you will have to wait for one with more knowledge than I to help you out. Wadmann