KeyCat 131 Posted June 12, 2004 Would like to do a couple of co-op recon missions where you should locate and identify a number of enemy objects deep behind enemy lines. Been thinking about this for quite some time but have been unable to come up with a solution. The problem is that I want the type and number of objects to be identified to be randomly created when the mission starts and thats not a problem, the problem comes after... How could I report the found objects back to a script from within OFP? Been thinking of using some kind of dialogs but have no experience with it so I wanted to hear what you guys think? Maybe some of you have a better solution??? /Christer (a.k.a KeyCat) Share this post Link to post Share on other sites
MrZig 0 Posted June 12, 2004 hmm? If I understand.. you want something like box = "box" createvehicle getpos boxlogic then ?Player knowsabout box >1 : player sidechat "I see the box!" hm? Share this post Link to post Share on other sites
KeyCat 131 Posted June 12, 2004 Using "knowsabout" was the first thing I tested long time ago but unfurtunately it won't work very well since the knowsabout value will only increase if you are close to an object not of you look at it with your binoc's (or other optics) from a distance. I would like to be able to do the recon from safe distance with binoc's as in RL where the players have to remember/write down how many of the objects they saw, extract back to base and then somehow report it back to the OFP script running and do a check if they succeded to spot all objects or not... Any other suggestions? /Christer (a.k.a KeyCat) Share this post Link to post Share on other sites
Wadmann 0 Posted June 13, 2004 Hello KeyCat! Only pointing you towards theory here and you probably have already read this, but here is a link to Dinger's tut on arrays. Maybe some use of metavariables could bring the results that you seek. Or ask the CoC crew for some ideas as they are a sharp lot! Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Wadmann Share this post Link to post Share on other sites
Chris Death 0 Posted June 14, 2004 KeyCat, maybe you should just let the player report the type of object and the coordinates, where he found something. This information compared to an array, where you've stored all randomly created objects and further info which you need, would then decide wether an objective has been completed or not. Make a dialogue for selecting the type of object and let the player confirm the coordinates by onMapsingleclick - or instead of the dialogue you could also do it by using custom actions with appropiate sub-custom actions. action - report objec: select type: apc radar station aa position ammo depot factory whatever else selecting a type will bring up a "head over to map by pressing "m" to transmit aproximate coordinates. Now you have some data to compare to your array being created at the start of the mission (when you create your objectives) - and if it's not total crap, what the player did enter - make the objective completed. Off course players who have lot's of time left, could give it a try to finish their missions right from the start position by some lucky punches, but there are lot's of ways to avoid that too. ~S~ CD Share this post Link to post Share on other sites
MrZig 0 Posted June 14, 2004 Yeah, IE <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">?time >60*5 : hint "There we go, the radio is now working correctly. damn batterys"; TransmitAble = true or whatever Share this post Link to post Share on other sites
MrZig 0 Posted June 14, 2004 Bah! I'm making you a script hehe, hold on. Yay! It works Recon script - beta 0.1 -------------------- Well the array thingy wont delete and if it does it messes up and agh, I just made it a scalar bool array string and it works. It works pretty good, edit/change as you like, but if you remember, try to give me credit for it in yer readme thx. (It's only a quick thing, I didn't intend on the actions to dissapear or anything, you can manage that I hope ) http://frutsel.terrainhost.com/frutsel....tro.zip Share this post Link to post Share on other sites
KeyCat 131 Posted June 15, 2004 Thank you all for the suggestions and especially thanks to you MrZig that even took the time to work out an example script! Will try it later tonight and let you know how it turns out... This forum as well as the forum over at OFPEC is top notch and I'm proud to be part of this great OFP community! Thanks again! /Christer (a.k.a KeyCat) Share this post Link to post Share on other sites
MrZig 0 Posted June 15, 2004 heh.. Well I wouldn't of known how to do it until Chris Death said the basics, then I just worked on it. Let me know what you think. Share this post Link to post Share on other sites