GTA: Modification Area

A website for the GTA modding scene

Search
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
» Big-game starts raising Schneider's profile
Sun Mar 04, 2012 2:28 am by lavivi

» [Help] cleo created lighting
Thu Oct 14, 2010 1:03 am by findmy012

» Mission Question
Thu Oct 14, 2010 1:02 am by findmy012

» [IV] Spoiler Script
Thu Oct 14, 2010 1:02 am by findmy012

» Mission mod [help]
Sat Sep 18, 2010 5:50 pm by jayd00

» Bc7 Mod Help
Fri Aug 20, 2010 11:19 am by pengpeng

» Found a bug
Fri Dec 18, 2009 4:22 am by _CJ360_

» [IV] Novitec Rosso 599 GTB
Tue Nov 17, 2009 4:22 pm by Kotton

» Hello/Guidance Request
Mon Oct 12, 2009 6:45 am by Adler

Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search
Affiliates
image

Image

Image

Image

Image

Image

Image

Image

Image

Image

image

Image

steve-m.com

Image


----- Русский -----

Если ваш сайт содержит большую коллекцию SCM/CLEO-скриптов (больше 16), напишите на мой e-mail, и я добавлю его в список. Приветствуются скрипты, которые не встречаются на других сайтах ... Спасибо. ))))


----- English -----

If your website has a big enough collection of SCM/CLEO scripts (more than 16) notify me by e-mail
, and I will add it to the list. The unique scripts are preferable ... Thank you. ))))

Log in

I forgot my password



December 2016
MonTueWedThuFriSatSun
   1234
567891011
12131415161718
19202122232425
262728293031 

Calendar Calendar


You are not connected. Please login or register

Conditions

View previous topic View next topic Go down  Message [Page 1 of 1]

1 Conditions on Tue Feb 24, 2009 7:04 am

Conditional opcodes checks whether the action is performed. In Sanny Builder, they are noted by spaces between the opcode and the description of the opcode. Conditions start with IF statements that checks if an action is performed.


IF


Code:

:Label1
0001: wait 0 ms
00D6: if
// Conditional (--something--)
004D: jump_if_false @Label2
// Something
 
:Label2
//.....................

Just IF on it's own means one. If you're script has more than one condition then it needs "if and", or "if or" (adding "and", or "or" after 00d6: if).

AND


AND means if both conditions are met:

Code:

:Label1
0001: wait 0 ms
00D6: if and
// Conditional (--something--)
// Conditional 2(--something--)
004D: jump_if_false @Label2
// Something
 
:Label2
//.....................

So if both of these conditional are met then the script will continue, if both are not met, then it will jump to "Label2"

OR


OR means if either one of the conditions are met:

Code:

:Label1
0001: wait 0 ms
00D6: if or
// Conditional (--something--)
// Conditional 2(--something--)
004D: jump_if_false @Label2
// Something
 
:Label2
//.....................

So if either of these conditions are met, then the script will continue,
if none are met, then it jumps to "Label2".

These numbers have the same meaning 0 stands for just "if" "1" can mean more than one(if and) 21 can mean if or, these numbers may-be used instead of the word.

Code:

if 0 = if
if 1 = if and
if 21 = if or


NOT


This means if it is false, for example:

Code:

00d6: if 0
80DF:  not actor $PLAYER_ACTOR driving

This will mean if the player is NOT driving, the first digit at the opcode will usually be changed to 8, instead of being just 0, when using the opcode, the "NOT" does not actually matter, as long as the first digit of the conditional opcode is 8 not 0, the game will still read the opcode as that.

See also: this(Scripting functions) and this(Creating a Thread)

View user profile http://gtamodding.com

View previous topic View next topic Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum