Bart.Jan
-
Content Count
739 -
Joined
-
Last visited
-
Medals
Posts posted by Bart.Jan
-
-
</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Sleepers-Neo @ Feb. 03 2003,15:50)</td></tr><tr><td id="QUOTE">Shouldent it be enough to write:
LANGUAGE in  Cell A1
English in Cell B1
Comment in C1<span id='postcolor'>
Do not use MS Excel (or another editor with different format) for creating and editing of stringtable.csv.
If you unpack some mission from official campaign you can see format:
</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">
LANGUAGE,"Czech","English"
STRM_FIRST,"Tak ty si myslÃs....","So you think..."
<span id='postcolor'>
And when you open and save it in MS Excel the format changes to :
</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">
LANGUAGE;Czech;English;
STRM_FIRST;Tak ty si myslÃÅ¡...;So you think...
<span id='postcolor'>
-
You can not choose person to spawn in. There are several types of respawn but none fits your criteria.
-
Another (tested) version :
</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">
_zombies = _this
_i=count _zombies
{removeAllWeapons _x;_x addWeapon "StrokeFist"} forEach _zombies
#main
~0.25
_i=_i-1
_zombie=_zombies select _i
_target = nearestObject [_zombie, "SoldierWCrew"]
? _zombie distance _target <= 1 : _zombie addMagazine "StrokeFist"; goto "attack"
? _zombie distance _target > 1 && _zombie distance _target <= 5 : goto "engage"
? _zombie distance _target > 5 : _zombie move (getPos _target)
#back
?_i==0:_i=count _zombies
goto "main"
#engage
_zombie dotarget _target
_nX = getPos _target select 0
_nY = getPos _target select 1
_zombie setPos [_nX, _nY]
goto "back"
#attack
_zombie fire "StrokeFist"
_x = random 2
? _x <= 1 : _target setDammage (getDammage _target + 0.1)
~1
_zombie removeMagazines "StrokeFist"
goto "back"
<span id='postcolor'>
call it, from init of player with parameter array of zombies
example :
</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">
[zmb1,zmb2,zmb3,zmb4] execute "zombie.sqs"
<span id='postcolor'>
where zmb1, zmb2 ... are names of zombie units
-
May be there is some problem with several running scripts. Try to use my modification :
</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">
_zombies = _this select 0
_i=count _zombies
{removeAllWeapons _x;_x addWeapon "StrokeFist"} forEach _zombies
#main
~0.25
_i=_i-1
_zombie=_zombies select _i
_target = nearestObject [_zombie, "SoldierWCrew"]
? _zombie distance _target <= 1 : _zombie addMagazine "StrokeFist"; goto "attack"
? _zombie distance _target > 1 && _zombie distance _target <= 5 : goto "engage"
? _zombie distance _target > 5 : _zombie move getPos _target
#back
?_i==0:_i=count _zombies
goto "main"
#engage
_nX = getPos _target select 0
_nY = getPos _target select 1
_zombie setPos [_nX, _nY]
goto "back"
#attack
_zombie fire "StrokeFist"
_x = random 2
? _x <= 1 : _target setDammage (getDammage _target + 0.1)
~1
_zombie removeMagazines "StrokeFist"
goto "back"
<span id='postcolor'>
execute it only once with parameter [array of zombies]
example :
</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">
[[zmb1,zmb2,zmb3,zmb4]] execute "zombie.sqs"
<span id='postcolor'>
-
Assign all men from squad to their vehicles (v1,v2).
init field of half of men :
</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">
this assignAsCargo v1
<span id='postcolor'>
second half with v2
Name whole group. Init field of squad leader :
</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">
grp=group this
<span id='postcolor'>
Then do not use getIn and load waypoints, but use plain move wps. Synchronize them and in "on activation" field of squad's wp put :
</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">
(units grp) orderGetIn true
<span id='postcolor'>
And create loadout should be similar, but I'm not sure :
synchronize move wps and in vehicle's wp put :
</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">
(units grp) orderGetIn false
<span id='postcolor'>
Not tested. Try to test orderGetIn true/false command together with assigned men and you can find some solution. Â
But if you are squad leader you must order your men to get in manually.
-
-
</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Ćlçi®-Åyon @ Jan. 30 2003,21:52)</td></tr><tr><td id="QUOTE">I've scripted a script with wich you can set lightnings how you want.<span id='postcolor'>
Simple script ? No addons ?
-
</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Axo @ Jan. 31 2003,03:15)</td></tr><tr><td id="QUOTE">I´m trying to get the closest object (of any kind) to an object but I can´t figure how...
I´ve tryed:
</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">_Near = nearestobject [_Obj,""]<span id='postcolor'>
And
</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">_Near = nearestobject [_Obj,"All"]<span id='postcolor'>
etc...
If can be done with vehicles, works for me
Another option is to repeat the line for every vehicle...
PD: Is there a way to know all the vehicles object currently in a map (w/o triggers)<span id='postcolor'>
Afaik it's not possible.
-
</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (InqWiper @ Jan. 31 2003,18:11)</td></tr><tr><td id="QUOTE">You can actually name a unit player? I thought you would get an error message because player is already used bu the game...what if you name a unit other than the player "player", then you do: something setpos getpos player???<span id='postcolor'>
Well, you can name it player. If some unit is named player then game moves with that named unit.
-
Do not name any unit player. Player is always soldier controled by gamer. In multiplayer player returns different names for each computer.
You can name player's soldier for example soldier and then you can use both examples equivalently:
</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">
soldier moveindriver boat1
player moveindriver boat1<span id='postcolor'>
-
</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (IBOPM @ Jan. 27 2003,02:19)</td></tr><tr><td id="QUOTE">1)My real question is how do you (using the init field only) start a vehicle or a person up really really high.<span id='postcolor'>
</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">
this setPos [(position this) select 0,(position this) select 1,(position this select 2) + 100]
<span id='postcolor'>
It make start object 100 meters above its original position.
-
I don't know if it's bug or if it has some reason but same "problem" is in SP missions.
Everytime I'm leader of group inside of vehicle I can order to disembark only after I disembark myself.
-
</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (MaxPower @ Jan. 26 2003,19: 03)</td></tr><tr><td id="QUOTE"></span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">
;for driver chopper2
chopper2D join gp
;for gunner chopper2
chopper2G join gp
;for driver chopper3
chopper3D join gp
;for gunner chopper3
chopper3G join gp
;for driver chopper2
driver chopper2 join gp
;for gunner chopper2
gunner chopper2 join gp
;for driver chopper3
driver chopper3 join gp
;for gunner chopper3
gunner chopper3 join gp
<span id='postcolor'><span id='postcolor'>
Syntax is bad. Usage of join command : unitArray join group
So it can be :
</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">
[chopper2D,chopper2G,chopper3D,chopper3G] join gp
<span id='postcolor'>
or
</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">
[driver chopper2,gunner chopper2,driver chopper3,gunner chopper3] join gp
<span id='postcolor'>
If you want to join choppers without cargo you can use :
</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">
(crew chopper2)+(crew copper3) join gp
<span id='postcolor'>
If you use only choppers' names :
</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">
[copper2,chopper3] join gp
<span id='postcolor'>
then only pilots (drivers) of these choppers join your group so, teoretically, you can have 11 choppers under your command. <!--emo&
-
</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Shark111 @ Jan. 25 2003,19:56)</td></tr><tr><td id="QUOTE">My problem is how to tell the editor that end1 is a victory and end2 Â a defeat, so that it can show the correct cutscene? After playing an awful mission I want to see the bad ending, not the congratulations!<span id='postcolor'>
For bad end (and outro-defeat) don't use trigger end2 but trigger loose (it's the last one in the list). Same in debriefing. Instead of
</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">
name="Debriefing:End2"
<span id='postcolor'>
use
</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">
name="Debriefing:Loose"
<span id='postcolor'>
-
1) name empty vehicles (t1,t2,t3,t4,b1)
triger condition :
</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">
("alive _x" count [t1,t2,t3,t4,b1]) == 0
<span id='postcolor'>
3) If you have done joining by wp you can put "1" objstatus "done" in on activation line of join and lead wp.
Or you can make trigger with condition :
</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">
soldier in (units group player)
<span id='postcolor'>
not tested
-
Use :
</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">
heli setBehaviour "careless";heli lockWP true;heli land "land"
<span id='postcolor'>
But you must have move wp near landing H and you must acticvate the code before heli reach that move wp.
To make heli continue its wps execute :
</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">
heli setBehaviour "aware";heli lockWP false
<span id='postcolor'>
-
</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (bn880 @ Jan. 24 2003,01:28)</td></tr><tr><td id="QUOTE">?_td<=180 and _ax>_dx:goto "failure"
?_td>180 and _ax<=_dx:goto "failure"
 <span id='postcolor'>
Thanks . Next mistake in capture script repaired.
-
</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Lt_Damage @ Jan. 24 2003,05:50)</td></tr><tr><td id="QUOTE">Ok I just tried to test it, nothing happened.. his weapon didn't disappear, i tried several times, not sure where its failing as there is no error. :/<span id='postcolor'>
This can be problem with nonlocal soldier  . I tested it in SP and it works*.
Try to execute this script in MP mission with eguy and eguy :
</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">
?!local wguy:exit
hint "remove weapons"
removeallweapons eguy
~5
hint "move"
eguy setpos position wguy
~5
hint "death"
eguy setdamage 1
exit
<span id='postcolor'>
and let me know if it works or not.
*I made repaired another little mistake in master script.
edit : solved - There is problem with removeAction  . It doesn't work that way as it shoud work. Sometimes Capture action remains in action menu and when you are near target again, another Capture action appears. Â
Next problem with
</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">
?abs(_ad-_td)>_angl:goto "failure"
<span id='postcolor'>
It doesn't work with direction range near 0.
-
I think it should work now. You must test it in MP.
-
Maybe gormen1 is part of group with another speedlimit. Try to use move instead of domove.
-
</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (bn880 @ Jan. 23 2003,20: 02)</td></tr><tr><td id="QUOTE">Only problem is, that will also work when the captive is behind the attacker. Â Â At least that's how I see it. Â You actually have to do cos and sin calculation to check who is behind whom.<span id='postcolor'>
Oops. That it's why it was so easy. Â I'll try to solve this.
Edit:
Solved, I hope  . I don't like sinus-cosine orgy
-
</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">
[ap] join grpNull
<span id='postcolor'>
-
Unfortunately you must use exact type of soldier (Spetznaz, Grenadier, Sniper).
Script can be better sollution for this.
-
It's pre-alpha version of script . It shoud work only for 2 soldiers now. wguy-attacker and eguy-target.
master script :
</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">
;-attacker
_atck=wguy
?!local _atck:exit
;-target
_trgt=eguy
;-distance
_dist=1
_act=false
goto "check"
#remove
?_act:_atck removeAction _aID;act=false
#check
~0.1
?(_atck distance _trgt)>_dist:goto "remove"
?!_act:_aID=_atck addAction ["Capture","capture.sqs"];_act=true
goto "check"
<span id='postcolor'>
I doubt that distance 1 meter is enough when you are trying to capture crouching soldier.
capture.sqs :
</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">
_atck=wguy
_trgt=eguy
?(random 100)>70:goto "failure"
;-1/2 of angle
_angl=15
;-must be from back :
_ad=getDir _atck
_td=getDir _trgt
?abs(_ad-_td)>_angl:goto "failure"
_ap=position _atck
_ax=_ap select 0
_ay=_ap select 1
_tp=position _trgt
_tx=_tp select 0
_ty=_tp select 1
?_td<=180 and _ax>_tx:goto "failure"
?_td>180 and _ax<=_tx:goto "failure"
?(_td>=270 or _td<=90) and _ay>_ty:goto "failure"
?_td<270 and _td>90 and _ay<=_ty:goto "failure"
;-succes
removeAllWeapons _trgt
_trgt setPos getMarkerPos "powcamp"
exit
#failure
;- there can be something like target's self-defence (penalty for attacker):
;- _atck setDamage (0.1+damage _atck)
exit
<span id='postcolor'>
Tweak "1/2 of angle" value.
I have almost no oportunity to test MP scripts. You must test it yourself. I don't know if removeAllWeapons and setPos works even for nonlocal soldier.
If it works let me know and I can try to make more universal version.
[product]: set lightning how you want
in OFP : MISSION EDITING & SCRIPTING
Posted
</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Doolittle @ Feb. 03 2003,10:19)</td></tr><tr><td id="QUOTE">So you are dropping something called "blesk1"??! Â How on earth did you find this??? Â Wonder what else we can drop.
Doolittle<span id='postcolor'>
Maybe he is using dictionary.
Czech "blesk" is english "lightning". Â
I have no luck with downloading. I can download it only with GetRight, but then it's damaged archive. (3167 b)