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



January 2017
MonTueWedThuFriSatSun
      1
2345678
9101112131415
16171819202122
23242526272829
3031     

Calendar Calendar


You are not connected. Please login or register

Mission Template

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

1 Mission Template on Thu Feb 05, 2009 11:13 am

Missions in CLEO

Mission must have a starter pack this thread will call the mission from the *.cm file
The starter pack Must have the *.cs extension. In CLEO Use the opcode 0A94: to start the mission
Write the name of the mission file your starting.

Example:


Code:

{$CLEO .cs}

:Start_Pack_00
03A4: name_thread 'StartP'

:restart
0001: wait  0 ms
00D6: if 
0256:  player $PLAYER_CHAR defined
004D: jump_if_false @restart0
00D6: if 
0038:  $ONMISSION == 0
004D: jump_if_false @restart0

:Noname1
00D6: if 
00FE:  actor $PLAYER_ACTOR sphere 1 near_point X.Y.Z radius  2.0  2.0  2.0
004D: jump_if_false @Noname1
00BA: text_styled 'Mission_Name'  1000 ms style 2
0004: $ONMISSION =  1 
0A94: start_custom_mission "CM_Files_Name_Goes_Here" 

:restart0
0002: jump @restart



Example: Of how to start creating a mission. Say if you save your mission script as "MyMission.cm" In the starter pack you would start mission as
MyMission


Code:

{$CLEO .cm}                                                   
03A4: name_thread 'NoName'
0050: gosub @Noname2
00D6: if
0112:  wasted_or_busted // mission only
004D: jump_if_false @Noname1
0050: gosub @Failed_End

:Noname1
0050: gosub @Mission_End
004E: end_thread

:Noname2
0317: increment_mission_attempts
0004: $ONMISSION = 1

//-----------------------------------------------------//
// Mission Script
//-----------------------------------------------------//



:Failed_End
00BA: show_text_styled GXT 'M_FAIL' time 5000 style 1  // ~r~MISSION FAILED!
0051: return


:Passed_End
01E3: show_text_1number_styled GXT 'M_PASS' number 2000 time 5000 style 1  // MISSION PASSED!~n~~w~$~1~
0051: return

                                               
:Mission_End
0004: $ONMISSION = 0
00D8: mission_cleanup
0051: return



How to put a mission in main.scm


1: Find

Code:

DEFINE MISSIONS 135 


Note: If you're using modded main.scm or whatever the number maybe different.
Up the number by 1 (You're putting one mission in)

2: At the end of the DEFINE MISSION list
After your list put,

Code:

DEFINE MISSION 135 AT @Name // Your Mission's name 


(Note: If you're using modded main.scm then it may be not 135 which is the next number).

3: Create your start pack

Demonstration:


Code:

004F: create_thread @StartP  // With the other create_threads commands



This goes before Mission 0


Code:

:StartP
03A4: name_thread 'StartP'

:restart
0001: wait  0 ms
00D6: if 
0256:  player $PLAYER_CHAR defined
004D: jump_if_false @restart0
00D6: if 
0038:  $ONMISSION == 0
004D: jump_if_false @restart0

:Noname1
00D6: if 
00FE:  actor $PLAYER_ACTOR sphere 1 near_point X.Y.Z radius  2.0  2.0  2.0
004D: jump_if_false @Noname1
00BA: text_styled 'Mission_Name'  1000 ms style 2
0004: $ONMISSION =  1 
0417: start_mission 135 // Mission defined number 


:restart0
0002: jump @restart


After the LAST mission of you're main.scm write you're mission in.
Demonstration:


Code:

:Your_Defined_Mission_Name  // Put you're missions defined name here....
03A4: name_thread 'Name'    // Put a name here....
0050: gosub @Noname2
00D6: if
0112:  wasted_or_busted // mission only
004D: jump_if_false @Noname1
0050: gosub @Failed_End

:Noname1
0050: gosub @Mission_End
004E: end_thread

:Noname2
0317: increment_mission_attempts
0004: $ONMISSION = 1

//-----------------------------------------------------//
// Mission Script
//-----------------------------------------------------//



:Failed_End
00BA: show_text_styled GXT 'M_FAIL' time 5000 style 1  // ~r~MISSION FAILED!
0051: return


:Passed_End
01E3: show_text_1number_styled GXT 'M_PASS' number 2000 time 5000 style 1  // MISSION PASSED!~n~~w~$~1~
0051: return

                                               
:Mission_End
0004: $ONMISSION = 0
00D8: mission_cleanup
0051: return


*Notes*


Creating a mission is tough for beginners, you should learn first, how a normal thread is created correctly, creating missions needs advanced knowledge of scripting, if you must try a mission for whatever reason, make it as easy as possible.

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