The above video goes away if you are a member and logged in, so log in now!
|
| |
Would you like to get all the new info from PSX-Scene in your email each day?
| |
|
-
#1
Coding in SCO Assembley
Coding in SCO Assembley –
10-08-2012,11:45 AM
Who here can code effectively in sco. im trying to teach myself, been looking up what opcodes do
and tried to make a script to toggle invisibility, does it look right, if not where did i mess up
Code:
FnBegin 0 2
CallNative THIS_SCRIPT_IS_SAFE_FOR_NETWORK_GAME 0 0
:Label1
PushD 0
CallNative WAIT 1 0
PushD 23
CallNative IS_KEYBOARD_KEY_JUST_PRESSED 1 1
JumpFalse @Label1
CallNative GET_PLAYER_ID 0 1
PushD 0
Var
RefSet
PushD 0
Var
RefGet
CallNative PLAYER_HAS_CHAR 1 1
JumpFalse @Label1
PushD 0
Var
RefGet
PushD 1
Var
CallNative GET_PLAYER_CHAR 2 0
PushD 0
LocalVar
RefGet
PushD 0
CmpEq
PushD 0
LocalVar
RefSet
PushD 1
Var
RefGet
PushD 0
LocalVar
RefGet
CallNative SET_CHAR_VISIBLE 2 0
PushD 0
LocalVar
RefGet
JumpTrue @Label2
PushString "STRING"
PushString "Player Now Invisible"
PushS 2500
PushD 1
CallNative PRINT_STRING_WITH_LITERAL_STRING_NOW 4 0
Jump @Label1
:Label2
PushString "STRING"
PushString "Player Now Visible"
PushS 2500
PushD 1
CallNative PRINT_STRING_WITH_LITERAL_STRING_NOW 4 0
Jump @Label1
FnEnd 0 0
all it has is 1 global variable thats currently set to 1
invisibility script.rar
-
10-08-2012,12:50 PM
looks good actually. would you like me to send you the work i did in .sco?
EDIT: just thinking there, you could make this a thread for cool .sco functions, that people could add into their script. have not seen that anywhere?
-
10-08-2012,01:08 PM

Originally Posted by
keredor
looks good actually. would you like me to send you the work i did in .sco?
if you dont mined this stuff looks confusing, but im sort of getting the hang of it

Originally Posted by
keredor
EDIT: just thinking there, you could make this a thread for cool .sco functions, that people could add into their script. have not seen that anywhere?
I dont think im up to that level just yet, and it would require explaining to everyone how to do it, and anyone who uses that sco 'security' will mean its not possible for that script. It would only beuseful for keyboard mod menus or similar which almost seem out dated
-
10-08-2012,01:23 PM

Originally Posted by
zorg93
if you dont mined this stuff looks confusing, but im sort of getting the hang of it
I dont think im up to that level just yet, and it would require explaining to everyone how to do it, and anyone who uses that sco 'security' will mean its not possible for that script. It would only beuseful for keyboard mod menus or similar which almost seem out dated
I did a MASSIVE edit to the 1.0s. and that is the script i use all the time , more so than my menu. and because i wrote it in .sco its alot easier to understand than the scripts that have been complied in scocl. ill upload it now and pm you the link.
-
10-09-2012,01:56 PM
I think you need variable set up for your first get player Id call, other than that I didn't look through it all. It will be more efficient code if you were to write mods in assembly. Catherine's v1.0 was written totally in assembly, before scocl was made. If you look at it you'll see it looks more efficient. But anyway yes make the rocket mod with it I'll test it for you
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|