Jump to content
Sign in to follow this  
Bullz_eye_on_my_back

Need help for a script for a spy camera

Recommended Posts

Yes, that's how i figured out how to script a dialog. From the dialog tutorial and his satellite script.

Also, thats why I'm asking for help with textures, not only just for the cypher addon itself, but to use for the dialog screen too.

sorry about the size, I didnt' know they would come out like that. confused.gif

Share this post


Link to post
Share on other sites

I'm trying to add another feature to the dialog....

I was trying to add a way for the person controlling the cypher to send out sidechat messages, but i can't seem to find away to do it.....

I've made an edit box in the dialog so that the person can write in text so they can communicate with their team without exiting from the dialog....

I'm trying to read the the edit box by script with.....

player sidechat "ctrlText 663"

663 being the idc of the edit box, but all i get is "ctrltext 663" back in the sidchat

I've also tried

_text= _this select 0

player sidchat "_text"

but i get back "_text"

is there a way to read a string and have it displayed for the sidechat??

Share this post


Link to post
Share on other sites

try:

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">player sidechat (ctrlText 663)<span id='postcolor'>

Share this post


Link to post
Share on other sites

Well, I leaped ahead in a new addition to the cypher, but it has caused a small problem.....

When I was revamping the look of it to look like all of the pictures of it...I made the camera model a gun turret...

by scripts I am making the camera point to the spot where the scripted camera is pointing....

The scripted camera is pointing at the set :: _target::

I've tried to make the cypher point at it by the dotarget and dofire commands but it won't target it...

So in that case I have used the an invisible object directly set positioned on the spot where the scripted camera is targeted...

This makes dofire command work great!

The problem is... once it targets the object... it takes off flying with a mind of its own... it flies up to an altitude of 200m and just flies straight and won't respond to any commands...

So i guess the question is.... Does the dofire command make the AI go towards the object its targeting too? And is there any other way to make the gunner point a specific coordinate?

Share this post


Link to post
Share on other sites

Dowatch?

You can make a dude look at specific co-ords by using camera.sqs to get them or something.

Or you can make him look at someone.

Thing dowatch thing2

Thing dowatch [983743.33248,4334893.3283,3.56521]

You see? crazy.gif

Gameer

Share this post


Link to post
Share on other sites

hmm...can't seem to get it to work ... ive tried...

#loop

_actManPos = GetPos cypher

_actManDir = getDir cypher

cypher dowatch [(_actManPos select 0) + (16 * sin _actManDir), (_actManPos select 1) + 16 *cos _actManDir, (_actManPos select 2) +_dz]

goto "loop"

and ...

cypher dowatch ct

"ct" being the invisible object

and still can't get it to work....

The only thing that works is the

cypher dofire ct

wink.gif

"scratching head" the do watch postion seems like it would work better... not sure why its not working though

Share this post


Link to post
Share on other sites

Hmm... thought i would send an update on how the project is going along.....

I still can't get the "dofire" and "dotarget" or "dowatch" commands to work... it still takes off flying on its own and will only fly at a height of 200m....

Meanwhile, while trying to figure out that problem I've started on the idea of ussing antennas to create a more strategic use of the cypher.....

I've created the antennas

I've made a script to show the strength of the signal recieved from the antenna depending on the distance from cypher. Also I've made it so that it will show the direction the antenna is in relation to the cyphers heading. biggrin.gif

Next I'm going to work on making a pistol (looking like a hand held gps or something) to use an event handler to start up the "cypher cam".. That way in multiplayer it could be transfered from one person to another by dropping it and giving it to someone, or could be placed in a vehicle or ammo crate biggrin.gif

I also want to get a command vehicle too...possibly find a great model and get permission to redo the cargo bay to look like a video media station and change a few things on the outside to make it distingishable from the other... ofcourse to view the cypher cam from the vehicle would over ride the hand held controls .... also antennas could be placed in the field from the command vehicle

does anyone know of a way to use the "dotarget" commands with a heli without it making it move?

Share this post


Link to post
Share on other sites

Well, I think I have gotten myself into a doozy of a script!!!

I'm trying to write a script for finding the nearest antenna to the cypher. The player will have the ability to set up or "build" 5 antennas as long as their command vehicle was alive. I'm thinking each one will have the range of about 2 to 2.5 grid squares around it.

I'm writting the script to check and find the nearest antenna to the cypher. From there I have to check and see if its alive or not. Then check if the player is within range of the same antenna. If not then it will check for the nearest antenna to the previous antenna, and do the whole check over again about being alive and close to the player, or if its within range of the first antenna. From there it goes through the chain again if its not satisfied - untill it is satisfied...

Its turning out to be a huge huge hugeeee script through only knowing a way of checking the nearest antenna by archiacly comparing the distances to each other and making command chains down to the right antenna....which would take me about a year to do lol

i don't think the "nearest object" will work since it only works for 50 meters....plus each antenna is named and it would need to know the name of the nearest antenna....

does anyone have a better way of finding the nearest object and its name?

confused.gif

Share this post


Link to post
Share on other sites

Sucess!!! I know it has been a while since I've last posted, but I have been pretty busy with a few other things, but I do have some great news!

I have developed some scripts that allows the player from a "command vehicle" (just an existing one ..hope to make one or get some help to make one) to set up antennas ...5 in total (more could easily be added). Each with a remote signal range of approx 3000 meters.

I have created it so that if the player isn't in a specific range of 1800 meters (not in command vehicle) or 2800 meters (if inside command vehicle) to the cypher then it will check for the nearest antenna.

From there the distance of the cypher to the antenna is checked to see if it is in range. If so, then it will check and see if the player is within the range to the same antenna. If not, then it will systematically find the nearest antenna to the first selected antenna that is within range of the player.

Also, if the antenna is destroyed then it will automatically be taken out of the "pool" for the nearest antenna.

At the same time I have created pictures that show the direction of the signal from the antenna or player to the cypher. Also, it shows the strength of the signal.

I do have one small lil favor to ask:

I still need someone to help me with the pictures though, I don't have the software to create transparent pictures. Also, I still can't find anyone to help texture.....

Thanks! I hope to get it out soon!

Share this post


Link to post
Share on other sites
Guest jacobaby

I'm very sorry I also haven't had time to offer much help. The last version you sent me was 1.4 I think? What are you up to now?

Btw, Paint shop Pro will do basic transparencies. Its a free trial and im sure there are ways to extend the lifetime of the trial *cough*

TJ

Share this post


Link to post
Share on other sites

It's totally ok TJ I've been fairly busy myself....::::mumbles about bridge design projects::::: smile.gif

I'm not sure exactly what version I'm on. I have implemented maybe 3 or 4 things into it. I fixed a couple small bugs and only have maybe one bug i just haven't sat down to fix. It shouldn't take much to do. I still haven't found a way to do the "do fire" or "do watch" or such without having the cypher start flying on its own.

haha...I'll try looking into the trial version!

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×