Softegg
Member-
Content Count
144 -
Joined
-
Last visited
-
Medals
Everything posted by Softegg
-
this sample don't works: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_number=0 ... _number=ctrlText 102 ? _number + 25 > 50 : hint "Bla!" ... how to cast the return-value of 'ctrlText' (or any other string) to number? any idea? Â /edit in vba, i would use: _number=val(ctrlText 102)
-
Typecasting of values/variables?
Softegg replied to Softegg's topic in OFP : MISSION EDITING & SCRIPTING
thx toad, your solution is the better way. -
Typecasting of values/variables?
Softegg replied to Softegg's topic in OFP : MISSION EDITING & SCRIPTING
I GOT THE SOLUTION BY MYSELF !!! <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_number=0 ... call format["_number = %1", ctrlText 102] ? _number + 25 > 50 : hint "Bla!" ... -
from the official comref: 1. the right place for requiredVersion is the init.sqs or any other script, and not description.ext. 2. sample of init.sqs with blocking <1.91-players: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> init.sqs ... ~1 ... ? !RequiredVersion "1.91" : goto "Required191" ... exit ;********************************************* #Required191 TitleCut ["","BLACK IN",10000] disableUserInput true TitleText ["OFP-Version 1.91 is required!!!\n\nPlease exit with Alt+F4!","Plain"] ~5 goto "Required191"
-
i am searching for information about the reason of lags and desyncs. there are some events that seems to produce a lot of data-traffic like dammaging a house or driving over a bush or tree. also, if 2 or 3 people are driving together in a vehicle, the traffic is high. but something like a local running rotorwash-script for a chopper is also producing traffic/lag/desync? is desync corresponding with high data-traffic (upstream and/or downstream)? maybe a list would be good, sorted by traffic/lag/desync-tendency. EDIT: or maybe things like the number of objects on the island are essential? maybe a simultan (sorry for my bad english) running voice-program like teamspeak is removing a lot of bandwith from the ofp-data-stream?
-
ok, now back to the main theme please !!! Â Â
-
i dont go conform with this. what is 'IsServer'? 'IsServer' is primary a global undefined variable. by setting 'IsServer=TRUE' or 'IsServer=FALSE', the variable is declared as boolean variable, and only contains the value 'TRUE' or 'FALSE'. what is 'local Server'? this is calling a internal ofp-function which needs to check and calculate some things to give back a result. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> 'IsServer=local Server' fills the global variable with 'TRUE' or 'FALSE'. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> ? IsServer : ... don't looks back for the defintion or declaration and calls again the function 'local Server', it just checks if 'IsServer' is 'TRUE' or 'FALSE', because 'IsServer' is just a global boolean variable. if you want to build something like you explained it, you must write and declare/call a function like this: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> IsServer.sqf _return = local Server; <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> IsServer=loadfile "IsServer.sqf" ... ? call IsServer : ...
-
i use this <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> IsServer=local Server because its easier for me to memorize. and also i think it's (minimally *G*) faster to set only one time the boolean variable 'IsServer' and further using it, than always calling the function 'local object' which (internally) needs to check and calculate a lot of things until giving me back the same 'TRUE' or 'FALSE' again and again.
-
if event-triggers and client-side-scripts are not also be called at the server, could this reduce the server-stress? sample: 1. creating a logic-object named 'Server'. 2. init.sqs ... IsServer=(local Server) ... ? ! IsServer: [chopper] addventhandler [...] ...
-
is there a way to "binarize" a mission-pbo so that the content cannot be "unpbo"-ed and reviewed? background: we play in a real-war-league and each map is unique. positions and equipment are essential sometimes and should be a secret for the enemy. but if a player disconnects he can unpbo the map on his local computer and check out everything.
-
@CrashDome: a new map has to be created for each war, because the positions and amount of weapons/vehicles depend on all former wars. right now, the best idea for our problem would be the one from Doolittle (calling a external .sqs). thx 4 this. Â
-
@lady: lol
-
is there a way to detect all mines on the whole island? i placed a mine somewhere, named it: mine1 typeof mine1 returns: "" so, how to search mines with nearestobject[player,"object"]? my idea is: finding a mine with: nearestobject[_posi,"MineMine"] setting a marker at this point setting _posi at mine-posi removing mine searching next mine
-
Finding mines anywhere on island
Softegg replied to Softegg's topic in OFP : MISSION EDITING & SCRIPTING
k, nearestobject[_posi,"Mine"] works. but i need to scan the hole island in steps of 64m, cause nearestobject seems to find things at about 50-75m maximum distance. -
Filling more than 1 ammo crate
Softegg replied to RedRaider's topic in OFP : MISSION EDITING & SCRIPTING
The file "WestCrateExplosives.txt" contains the following text: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">clearWeaponCargo this; clearMagazineCargo this; this addMagazineCargo ["CarlGustavLauncher",100]; this addWeaponCargo ["CarlGustavLauncher",10]; this addMagazineCargo ["LAWLauncher",100]; this addWeaponCargo ["LAWLauncher",10]; this addMagazineCargo ["AALauncher",100]; this addWeaponCargo ["AALauncher",10]; this addMagazineCargo ["Pipebomb",30]; In the Init section of the first crate I have put: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">[] exec "WestCrateGuns.txt" And for the second crate: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">[] exec "WestCrateExplosives.txt" your first try was nearly correct, but you forgot to pass the ammobox-object to the script. it would work like this: [this] exec "WestCrateGuns.txt" [this] exec "WestCrateExplosives.txt" -
in multiplayer-setup, the different groups have names like 'group alpha black' or 'group alpha blue'. is it possible to change these names at this point? i created a group of west-players, the leader got a init-sequence like this: 'group this setgroupid ["Charlie","GroupColor7"]', but the text at the multiplayer-setup wasn't changed.
-
is there a way via scripting to count how many weapons or ammunition is in an ammobox?
-
Counting weapons/ammo in ammobox
Softegg replied to Softegg's topic in OFP : MISSION EDITING & SCRIPTING
i want to determine and count the available amount of any weapon or ammo in a ammobox. at the beginning of the match, the players can add weapons and ammo in the ammobox, at the end of the match, the remaining amount has to be counted. -
@benu: look here: http://www.flashpoint1985.com/cgi-bin....eckfile
-
if you play with 'crosshair on' and you use an aa-missile, you first lock on the target and then you fire the missile. but, how to lock on the missile in 'crosshair off'-mode? if i only fire the missile in the direction of the target, the rocket don't follow the plane/chopper. so what is the clue for hitting a plane/chopper with an aa-missile in 'crosshair off'-mode?
-
but there is no confirmation that i've locked on correctly, right?
-
Representing [THC] The Hard Core, we are in the process of adopting the filename convention. /EDIT work done.
-
yes, and the response and solution of BIS is the '#debug checkfile'-command.
-
there is a way, you can use a different map-file with the same file-name and ofp dont care about it. maybe, a map contains a 'setviewdistance 1000'-command. but you can alter your map-file and enhance the viewdistance to i.e. 5000. some other advantages can also be added in your map-file and this is only executed at your computer. only with the '#debug checkfile'-command you can check and confirm that all connected players are really using the same map-file.