OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: rOk on 02 Jul 2004, 15:21:16
-
SAT_POS=getpos player
Is the initial position of the camera
I want it to be in a On Map SingleClick format, not that it just stays there where the player started, Vektorboson wrote that it is possible but he neglected to explain how
Thanks
Im looking for something like
SAT_POS=OnMapSingleClick player>except that doesn't work
-
i have modified the satelitescript so you can use it with a single click on the map. (I'm not the only one, I suppose...)
Leave you email and I send it 2 U :)
-
Ok, I will give it a shot... although I am very much a beginning scripter (I refrain from using the term "n00b" :P ) myself.
In the init.sqs file for the mission, use OnMapSingleClick to create a marker or gamelogic. Then have the SAT_POS = the name of the object/marker you created. Although I think that there would be a problem when the object == objNULL (it might produce an error or go out to the ocean).
So maybe you should create a gamelogic, name it bob or something. And then OnMapSingleClick getpos bob. Iono, like I said, I am a beginning scripter. (Been doing it for a while, I'm just not very good at it). K, hope my suggestions help!
-
boo someone beat me. Tho at least Blanco has a working version! ;D
-
Thanks for the quick replies
@ Blanco
Just click my name and my profile will appear, there's the email
Thanks again
-
Your email is hidden. :P
Send me a pm with your email.
I modified the script so the satelite appears at night with NVgoggles overlay wether the user has a NV goggles or not.
When he has'nt got one in the mission, the NV goggles is removed once the satelite exits.
You activate the satelite via an addaction and it takes some time before the satelite is in position.
-
Blanco, check your pm box.
-
Script on the way...
-
Thanks, got it, will test ASAP
btw, that's a cool trick-renaming stuff...
Did you change anything in the description file?
I have this huge .ext file already, and searching things down would be a pain.
Just a bit of constructive criticism-you could have put it all in folders(like the original)-my mission file is cluttered with scripts already and now this?!-anyway will probably do that myself, and of course good work and thanks for the help.
-
yeah I've used custom lettertypes for the messages that come from the satelite itself, that's why the description.ext is so big.
I agree, I always like my things organised, I should put them in folders again. :-)
-
Can I just take the init or does it have to be the whole package?
And if I wanted to join it with let's say Kegetys or VektorBoson's spectator script, merging the descriptions from the define's downwards wouldn't do, right?
-
There some new boleans in the init.sqs
moving = false
repos = false
plhasNVG = false
and this line too
?(player hasweapon "NVGOGGLES") : plhasNVG = true
In de description.ext
all the code under this line
///////////////////////////////////////////////////////////////////
class RscStdText
{Type=0;
....To the bottom...
is also new...
Merging this description.ext with the one from the spectatorscript will cause a CTD, I guess.
I've never used those scripts because I rarely make MP missions.
Btw is vectorbossons satelitescript MP compatible?
-
I guess it is MP compatible, no point in making a spectator script if it isn't, although haven't really tried it yet.=>spectator
Finally tried it=>satellite, i like it a lot, the satellite moving into position etc...
But I noticed you dropped the slider and reverted back to Zoom In, ZoomOut buttons; At first I thought it is a matter of taste or didn't you have the newer version with the slider?
If it's the second, I can send it to you and you can do your stuff again.
Where are the pics defined (locations)-I'll be moving them into a separate folder?
edit:just making stuff clear
-
I guess I've modified the old version... lol
Must be more than a year ago.
-
Damn, I was editing the last post and you beat me with a reply.
Do you want the newer version?
Where are pic locations defined?
I .ext file I know, but for your stuff anywhere else too?
-
Yes, u can send it to me, and i can take a look at it, but don't expect it modified tommorow, i got lots of other things on my mind right now.
I did'nt move the pics, (rauschen.paa...) they were in the root directory of the missionfolder. (at least it was in the old version)
Actually I don't understand your Q; Do mean the custom text?
Those are not pics, OFP got custom types allready, you only have to define them in description.ext.
-
I'll be sending you the mission file right now.
No sweat if it's not tomorrow.
I was just trying to redo the new one in your style and after it CTD, i got ingame just to see "resource tile click not found" error message!
I'm guessing I forgot to define the new fonts.
-
i didn't recieve anything yet...
Don't forget to rename the .zip -extension , because our mailserver blocks all zipfiles for security reasons
-
Sorry, girlfriend trouble!
It should be in your mailbox, it's not a .rar file
Oops, hope you're still working, 'cos that looked like a company address to me.
-
y, i'm still at work, but i don't see anything in my mailbox.
Expect for some complains from clients... ;D
Maybe zips,rars or any other packing format are blocked, i dunno
Rename it to .whatever -extension
Or is there a link where I can dl it?
-
I think right here @ OFPEC, just type modSatellite into the search box
Wrong...type satellite and there should be 3 entries displayed, choose the third one (Vektorboson,v1.1)
I renamed it to satellite.abubu
-
Yeah , I've found it but the link doesn't work anymore (for me)
Duh!
-
Try again, I've just tried it and it works!
Some firewalls and OFPEC don't go well together(something about the cookies I think).
I had to configure my Norton so that it allows downloads from certain sites (including OFPEC).
Temporary solution #1: if you have firewall, disable between the time when you click and the download dialog appears.
Lousy solution #2: I can send you script by script.
-
OK, I have it.
I don't see many differences, except for the slider and the playerstatus script is gone.
-
Well for me the way things are set up (in folders) is a great improvement. And I like the slider too, it gives you a better feel.
-
ok, the script is almost modified, alll I have to do now is clean up some dirty code and send it to you.
I added a lot of voices and sounds, it looks like the satellite is talking with you in his monotome female computer voice.
(I'm a soundguy, you know. I always have to do something with sounds when I modify a script)
Almost every button in the satellite interface has a new sound.
You can use the satellite via addaction and mapclick, but i avoided the command player, so you attach the action to a object (laptop, vehicle...) as well.
I don't think it's realistic to use such a device while you are running. I dunno nothing about these hightec stuff, but I remember in the movie Tears of the sun they had such a portable device.
I wanna make it so that the satellite tells you the object it's tracking is hostile or friendly, tank, car or whatever.
Is this a good idea?
Or totally Scifi?
-
Hostile/Non-Hostile indicatior would be nice
Also, once you've finsihed the script, I can host it for you, if you want
Just email me (ben *at* dbrweb.co.uk - Change the *at* bit to an @, obv'ly :P)
- Ben
Just had an idea... how about, a bar along the bottom of the screen, with dull green shapes of a person, car, tank, plane, and a heli, and if the selected unit is a person, it lights up the person icon..?
-
ok, I'll send it to you when it's finished, thx a lot
Hostile/Non-Hostile recognition is done via voices. (20 voices + 5 custom sounds)
I use a text to speech program (coolspeech 5.0), the female voice I choose is very clear and doesn't sound too robotic.
about the tracking...
I did it like this :
_object is the tracked vehicle...
SATuser is the player
"tr_f_tank" is voice that says "tracked object is a friendly tank"
?((side _object == side SATuser) && ("tank" counttype [_object] > 0)) : playsound "tr_f_tank"
...
but...
When It tracks an empty vehicle...What can I do with counttype? Is there something like :
("empty" counttype [_object] > 0)) :...
the visible indicator via shapes or silouett is a good idea but I'm still learning dialogs, I don't think I can do that now... (not yet)
-
No probs :)
Yeah, the spoken voice is a good idea
The dialouge.. Look for Dialouge Editor (Or something, really cant remeber) in the editors depot, might help?
Anyway, gd luck!
- Ben
-
Any idea how I can track empty vehicles with counttype?
Another question :
The zoom slider is alligned horizontal, I wanna replace it with a vertical slider on the right border.
I found in the description.ext a ST_HPOS static style, is there also a ST_VPOS style and how can I define it?
H stands for Horizontal, I guess.
for ST_HPOS it's
#define ST_HPOS 0x0F
What is it for ST_VPOS if it exists?
-
Hey Blanco
Sounds like a good job, can't wait to try it out
By soundguy, do you mean music (production) in general or OFP talk?
Oh i just remembered something...
The version I sent you cannot track spawned units/vehicles etc. Anything that can be done on that? I tried to put the trigger(unit detection) in the editor to repeatedly and it didn't work.
-
From Vektorboson's Dialog tute:
class RscSliderH
{
type = CT_SLIDER;
style = ST_HPOS;
color[] = {0.2, 0.2, 0.2, 1};
idc = -1;
sizeEx = 0.025;
};
I called this class RscSliderH because it is a horizontal slider (and BIS called it that, too). If you need a vertical slider, just change style to ST_LEFT.
I tested this and it works ;)
You should ofcourse change the width and height accordingly (swap them from your original horizontal slider).
-
thx, ponq
I must have overlooked that comment in his tute
Progres :
- It takes some time before the satelite is in position, time depends on the distance between SATuser and Camlogic.
1sec per 100m, so when you want to scan an area 1000m away from you it wil take 10 sec before the satellite is in position.
- You can cancel the satellite while you 're waiting
The version I sent you cannot track spawned units/vehicles etc. Anything that can be done on that? I tried to put the trigger(unit detection) in the editor to repeatedly and it didn't work.
.
You mean copyobjects.sqs?
Copying the objects in that trigger happens only once in the beginning, I think you have to update it sometimes in a (not to fast) loop , maybe 30 sec could be enough.
Soundguy in general or in OFP?
Both, I was a in band 4 years ago, but I have still my studio.
-
Hey Blanco
The woman voice and the waiting period sound really cool.
Does it perhaps simulate Chinese accent too?
Think it would be best if I let you handle the updating part, 'cos I simply don't know how to script that. :-\
And all in all it would be a good addition to the script, once every 20-30 secs would be just right.
Nice! ;D
*reffering to studio*
-
About updating spawned units...
You can also add the unit to the allobjects list in your spawnscript itself. I dunno what spawnscript you are using, but when you give each spawned unit a name ( can be local I think) you can add him to the allobjects list.
The allobjects list is a list with all units on the map created in the beginning.
Should look like this :
"SoldierWB" createUnit [getMarkerPos "SPAWNHERE", groupAlpha, "_loon = this",0.6, "corporal"]
allobjects = allobjects + [_loon]
So you don't have to update the allobjects list each 30 sec or so, only when a new unit is created.
I don't know coolspeech supports the Chinese language, I don't think so :P
ZoomSlider is vertical aligned now. (thx Ponq)
Is there a way to align the text "IN <== ZOOM ==> OUT" vertical in the dialog? I tried ST_left as static style but it stays horizontal.
Maybe I replace it with picture of a little magnifying glass with a little minus and plus in it,...like in Photoshop...
-
Argh
I'm using this:
"SoldierWB" createUnit [getMarkerPos "alpha", groupAlpha, "s1 = this",0.6, "corporal"]
and then
s2=this
s3=this
etc...
if I put _loon
names wouldn't matter, right?
The end result being:
"OfficerW" createUnit [getMarkerPos "alpha",groupAlpha, "_loon= this",0.8, "corporal"
allobjects = allobjects + [_loon]
~1
]"SoldierW" createUnit [getMarkerPos "alpha", groupAlpha, "_loon = this",0.6, "private"
allobjects = allobjects + [_loon]
~1
]"SoldierWB" createUnit [getMarkerPos "alpha", groupAlpha, "_loon = this",0.6, "private"
allobjects = allobjects + [_loon]
~1
Correct?
And your method is better, it saves a lot of time. Typing to give them all different names is a pain. :P
-
Yes, there were 2 right brackets too much, but I think you got the point ... I didn't test it with _loon for every created unit, mut I think that should work, unless you need that unit later for a trigger or another script, then your name cant be local, or you can use the groupname (in your case GroupAlpha)
"OfficerW" createUnit [getMarkerPos "alpha",groupAlpha, "_loon= this",0.8, "corporal"
allobjects = allobjects + [_loon]
~1
"SoldierW" createUnit [getMarkerPos "alpha", groupAlpha, "_loon = this",0.6, "private"
allobjects = allobjects + [_loon]
~1
"SoldierWB" createUnit [getMarkerPos "alpha", groupAlpha, "_loon = this",0.6, "private"
allobjects = allobjects + [_loon]
~1
-
On this last note how would it be possible for those soldiers to execute a script after they're spawned.
I'm thinking something like a small trigger over the spawn marker which tells every unit of that side to exec a script.
Or perhaps written somehow in the script (the one with names) in a "_x exec "something.sqs" for each units group this" format-although i have already gotten errors trying this way.
On the other hand adding an eventhandler at the bottom of a script like that worked like a charm, but i attached it to a variable not an object(name).
Hope I'm still making sense, I'm in discovery mode right now. ;D
Thanks
P.S.:not Chinese language, English language with an Chinese accent
-
To make spawned units run scripts : you d someting like newunit01 = "Soldier" createunit [here]
And then do [newunit01] exec "script"
- Ben
-
Indeed Onix, I used it this way too, but am wondering if one line of code could do it for the whole squad.
-
That update is more important then I first thought.
When you place a manned vehicle on the map and you track him in satellite view, the crew will not be tracked when they disembark, because only the vehicle is in the allobjectlist at that moment, not the crew.
I can solve it with updating the list every time you activate the satellite, but it's still a problem when they disembark while you are tracking.
I could solve the problem with the recognition and tracking of empty vehicles, but you can't determine it's hostile or friendly because the side of an empty vehicle is always CIVILIAN. Dont ask why, it an engine restriction I guess.
I hope I can release a betatest this week,... when I don't find those last minute bugs anymore... >:(
You can attach the satellite action to a soldier or a vehicle. When you attach it to a soldier, he will lay down while he's in satellite view.
-
So what do you want to happen when the crew get out.. What one would you track..?
Oh, it's civvilan so no one fires on it.. I guess
"You can attach the satellite action to a soldier or a vehicle. When you attach it to a soldier, he will lay down while he's in satellite view."
Hehehe :P
Paranoia pays off!
Do you make an object near them, that might make them think an enemy is near by? Dunno :S
Indeed Onix, I used it this way too, but am wondering if one line of code could do it for the whole squad.
Um.. The foreach command?
- Ben
-
Hehehe
Paranoia pays off!
Do you make an object near them...
;D
I make him lie down so he use cover and not just standing there. Remember you can't move while a dialog is active...
Creating an object near the SATuser would be nice, be I don't know what object to choose. I was thinking about the laptop from the editorupgrade102. But AFAIK there's only a closed laptop. I need an open one.
Yes I'm a perfectionist.
...that might make them think an enemy is near by?
I really don't understand what you mean.
Probably my bad English... :P
So what do you want to happen when the crew get out.. What one would you track..?
Imagine this : You are in satellite mode and you're tracking a truck. The truck stops and the soldiers in cargo disembark.
You can track the truck but you can't track the soldiers because they aren't in the Allobjects list at that moment.
Maybe updating the list each time you push the track button could solve it.
@RoK
"[_x] exec ""script.sqs""" foreach units Groupalpha
Should work
-
About the object in front of the player while looking @ satellite:
There's a pc available @ ofp.info, comes with Windows XP, mahagony desk, nice comp. box etc...
That was a joke ;D
My comments:
The soldier lying down while checking satellite-excellent idea
The updating to allobjects list when pressing track could be OK, as long as it's fast enough, so you wont be getting "No objects found" message for like 2 secs and then it would start tracking.
Must tell you can hardly wait to hear the woman, I have a thing for women "coordinators".
-
Blanco.. I though you meant the person lies down is an enemy Ai, and somehow went prone when you started tracking them ::)
I see what you mean now
BTW, I could nock up a quick open laptop if you want..?
- Ben
-
lol, her name is Mary
Mary tells you if tracked unit is a hostile/ friendly / empty tank, heli, car, plane or ship.
Soldiers are just tracked as human, because there nothing in a man's body that makes him hostile or friendly. If you want to see it changed it not difficult to do.
About the tracking issue...
Yes, I hope it's fast enough.
-
Sounds perfect!
-
yeah, a open laptop sounds great, DBR_ONIX !
This script is getting big, (5Mb unzipped, that big for a script) due the sounds and stuff, so I was thinking to put all sounds in a seperate pbo in a later stage, maybe together with the new laptop.
I'm already working on a new monitor and merged it in the dialog, (first time I'm doing this :P)
ingame picture (http://img75.photobucket.com/albums/v228/blanco2/SAT/satMONITOR.jpg)
The buttons are not on the right place yet ,it's just a quick test, the last thing I did last night.
I've tested updating the allobjects list with the tracking button, seems to work fine.
-
What sound format are you using?
Hope it's not wav.
-
no, it's wss,but more than 20 sound files :)
I think i gonna lower the quality...
-
Either that or mono, I'd go with the latter.
Most people wouldn't even notice the difference and you'd be shaving 50% off the size.
Hope .wss isn't mono already, I don't really know much about it.
-
it's 44100 Khz, 16-bit, Mono
I will make it 22050Khz
-
DBR_ONIX check UR mail, please.
-
;D
You can all download it on Mr Smilie >> :) (http://www.dbrweb.co.uk/hosted/modSatellite1.2.Intro.zip)
(2.25MB .zip)
Right click save as, I suppose :)
Not tested it yet, but it's all there :)
Have fun :D
- Ben
-
2 Notes about the testmission :
I forgot to delete 3 test RADIOtriggers.
The trigger named SAT_list is the only one you need.
About this :
Just had an idea... how about, a bar along the bottom of the screen, with dull green shapes of a person, car, tank, plane, and a heli, and if the selected unit is a person, it lights up the person icon..?
Like I said, I'm still learning dialogs,but I've already put pictures in dialogs and I'm making a new monitor for the satellite.
First thing I tried is, to replace the red tracking dot with a flickering lamp on the right border.
Here's a pic made in photoshop
http://img75.photobucket.com/albums/v228/blanco2/SAT/Satmonitor2.jpg
The red lamp is already on the frame, the red glow is a layer.
The vertical rectangle above the lamp is were the slider should come, below the lamp are the directions buttons
The frame is not the problem, the red glow is.
It always appears under the framepic, can you place two pictures over eachother in a dialog? Is there a way to arange the different layers like you can in Photoshop? ???
Also, I never have the same quality as in Photoshop, even when I split it in four pieces, so I can keep the diminsions relative high (265*265)
And the colors are always 20% brighter ingame than in Photoshop :-\
Btw : Do you like the layout?
-
Excellent work, Blanco.
Mary is all I thought she'd be-lol.
But on a more serious note:
I think you posted in the official forums that it's not MP compatible. Any new breakthroughs or workarounds regarding that?
Like the new layout.
Have fun
-
No ,
- I need to make the variable for the user local and transport it to the other scripts, because right now there can only be one SATuser.
- A SATmarker and camlogic for each side.
- The voices will be heard by every player too with playsound...
- Maybe some other things I don't know now...
Hmmm... MPscripting is not easy... :P
-
- I need to make the variable for the user local and transport it to the other scripts, because right now there can only be one SATuser.
That's how I intended to use it anyways-just for he commander.
- A SATmarker and camlogic for each side.
West only uses it.
- The voices will be heard by every player too with playsound...
You can camouflage it like radio chat-just add some noise at the beginning and the end of sounds.
I know it's not perfect, but it's the best I can come up with.
Have fun.
-
oh, I thought you wanted to make some kind of satellite versus satellite map... :)
Hmm, That make things a lot easier.
About the playsound issue :
You can always use the say command where the camlogic is the speaker.
I think it will be better to make a SP and MP version, but let me finish the SP version first.
-
Well, good news is i succesfully integrated spectating script from Kegetys and VektorBoson's satellite script, so I'm quite eager on integrating yours too.
oh, I thought you wanted to make some kind of satellite versus satellite map...
No, no the enemy have other tricks up their sleeve ;D
You can always use the say command where the camlogic is the speaker.
Any chance of syntax on that? ::)
And I have a really cool idea.
Except the key script doesn't work as advertised. :-\
;Setup Perimeter by Grendel
;causes AI in group to form a circle facing outwards
;Commander Init=>player addaction ["Setup perimeter","Perimeter.sqs"]
pgroup = group player
_groupnum=(count units _pgroup)
_grouparray=units _pgroup
_deg=0
_splitdeg=360/(_groupnum-1)
_range=15
_pos=getpos player
_px=_pos select 0
_py=_pos select 1
#top
_groupnum=_groupnum-1
?(_groupnum<0):exit
_pman=_grouparray select _groupnum
;skip player
?(_pman==player):goto "top"
_deg=_deg+_splitdeg
_movex=_px+(_range*(sin(_deg)))
_movey=_py+(_range*(cos(_deg)))
_watchx=_px+((_range*2)*(sin(_deg)))
_watchy=_py+((_range*2)*(cos(_deg)))
_pman domove [_movex,_movey,0]
_pman dowatch [_watchx,_watchy,1]
goto "top"
the loons (if any exist in group) should set up a perimeter around the commander when he is immobile and watching the sat info, but they don't.
But it would be nice if you'd make it work and integrate it into your script.
Not trying to overload you, far from that, it would just simply be a nice feature.
Anyways you've done a great job on the script and it's great as it is, so no problem if you won't like it.
Have fun
-
I don't see anything wrong with it?!
Any error messages?
Sounds like a good idea, tho
I'll check it out.
**edit***
Not tested yet, but I think I found it....
The first line in the script
pgroup = group player
should be...
_pgroup = group player
-
You found the bug! :D
It's working now and it's cool all that is needed is that they automatically assume combat or stealth behaviour.
You can actually issue them an order to go prone though.
-
That new screen looks really nice ;D
Also, I've got a laptop model you can use (It's a friend who made it, but he's sent me the files, and says that you can use them), It's textures aren't that good, but I could use that Photoshop picture you made for the face texture.. But I suppose your never gonna see it that close up anyway..
It's not got a CPP, and the textures are kinda big, but I'll fix that tommorow (Well, today is in 15 mins :hmm:)
Anyway, night! :P
- Ben