First, it checks the game version, if the game version is the original version (v1.0 US) then it will call the textbox which is at address 0x588BE0 in game version v1.0, otherwise false, and it will call the textbox for game version v1.01 which is at 0x5893B0 then the code return's where it last gosubed.

I tell you in the comment, that you should set Sanny Builder Options -> 'Case Coverting' to 'As is' so the text will not be displayed in UPPER-CASE letters, but how the user writes it.

This is just one way of displaying text via script, I know many, many ways, some which I posted in the SA Memory Topic & some on some Russian forums.

In this one the text data is stored using Sanny Builder's hex..end feature, to mark a space ( ) using this format use '_' as spaces do not get read by the script, the '00' (digits) at the end are needed, so when displaying the text the hex..end its self will not get displayed.

When you decompile the script it will be in its hexadecimal-format,

this:

Code:

hex"~r~ You_got_owned!" 00end

will be:

Code:

hex 7E 72 7E 59 6F 75 5F 67 6F 74 5F 6F 77 6E 65 64 21 00end

Read about the CLEO opcodes » there » or in Sanny Builder -> Help -> CLEO 3 opcodes.

--

I should say, if CLEO is not installed, and you want to script in main.scm, and do the same thing, you may check the game version using:

Wow thats way easer. But now I have a camera related question do you know how to get the camera coords? Because I want the camera in a certain spot like over cj's head for a mission like in the bigfoot mission.

Thx the thing is I wasn't sure how to get the coords for the camera. But I looked in the BigfootCleo.cs from the X-files 2 and after the custom mission is loaded why did you have it spawn the actor? Or is that the actor that the camera looks at during the cutscene?

If I understand correct, I made a Bigfoot for the small cut scence, and destroy it after. It's not the same Bigfoot that spawns at a random_int location. All models are loaded when the camera is in the sky, (I do not wish to make people see how the game spawns them) 5 seconds later the cut scence starts. Thing is, the mission uses global variables for the timer/health bar, since the mission was made there are been ways now to create a timer/status text without using them, the post was in Russian language, I posted it in English in the Mem Topic, and Russian in the Russian forum.

----

To try and create a status_text without using global variables, try this test script, it is written by Seemann.

That is a script, 2 scripts in one CS-file, kind of. When you pass the mission 5 times the Bigfoot will spawn. Nothing-releated to the actual mission.

---

If you want to make a function like this, where you can check how many times the mission has passed to unlock a special function use the var function.

In CLEO-scripts, we use CLEO-var opcodes to check, you can use globals - but I recommend not to (because of the CLEO rule, which Seemann has said over 100000 times - do not use globals in CLEO scripts - NEVER).

Place this at the script of the script (starter-pack):

Code:

0A95: enable_thread_saving 0AB3: var 15 = 0

This code will set the var 15 value to 0, and enable the threads saving.

Put this in the startpack script also:

Code:

0AB4: 31@ = var 15if 31@ == 5 then ...activate sub-Bigfoot scriptend

This will check if the mission has been completed 5 times.

In the CM-file (Custom Mission) when the mission is passed add 1 to the var 15, so that it will know, it will add 1, so when you pass the mission again it will be second time, etc.

K but about the script you posted above how would it look for the actor to shoot the gun, then kick the player, then shoot over and over until he's dead?Edit- yes the var stores how many times the mission is passed, in a nutshell.

No, I only ever use Sanny Builder to get coords.Yea, of course this script will not work, because you forgot a jump, so when it goes to label 13, it will gosub fine, but when these have finished returning it goes right on to :ReadMem and it gets stuck there. Also the jump@HUNT_N_10 after the text is not needed, as the script itself does not read the hex..end text by its self going right after, the thing which does isthis:

Code:

000E: 4@ -= @Message1

So after the gosub @BlackBox gosubed to the display text_box sub-script, it then returns, but it has no where to go other than going right on to the label ReadMem AGAIN, it sees the gosub, and the engine thinks, WT*?, there is no gosub to return, because I have not gosubed.I hope you understand what I mean.

Use this slightly modded script:

Code:

{$CLEO}

0000:

:Script_01while truewait 250 if Player.Defined($PLAYER_CHAR)then if $ONMISSION == 0 then break end endend

Thx! Yea the high-level construction does look good just need to get how the while-true and break work other than those I think I got most of em. And the script crashes because it keeps read the gosub?

No, because after it HAD finished reading the gosubs it goes right on-to label :ReadMem, and it sees the 'return' but there is no gosub to return. So the game just crashes. And it's already readed the sub-text script, there is no reason why it should do so again.

K now I get it. I'll read up on that just as soon as my pc is fixed. Until then I'm on my psp. And on this the page is stretched.edit- now it flashes the text constantly even thoI'm not in the marker or on a mission :/

d'oh if it was any easier it would bite me thx monedit- got another question once a cm has started or before it starts can you check if a another cleo or .cs has started?maybe something with 0ABA might work..edit2 also it looks like theres a bug in the 2nd cleo you posted the one with the ped that shoots, kicks and then shoots again, if you kill the actor before he does the animation it has the player do the fight c ide animation then loops and looks up, but I can still pause it.