Quantcast

Jump to content

» «
Photo

Mission template

3 replies to this topic
AB0333
  • AB0333

    ___________

  • BUSTED!
  • Joined: 29 Jul 2009

#1

Posted 07 July 2013 - 12:25 PM

Hey all.

I'll shorten the chit-chat, and I'll just say my coding skill is reaaally weak. I want a checkpoint mission template.

I want the player follow checkpoints [on foot]. So:

1. An icon and sphere appear on xyz, which triggers the mission.

2. After the player triggered the mission, a checkpoint appears, and a player needs to get to it. After the player is in checkpoint, another one appears. After player has entered the second checkpoint, the mission is passed.

It can be either for CLEO or .scm, doesn't matter.


Thanks a million.

Miro
  • Miro

    Time Killa™

  • Zaibatsu
  • Joined: 26 Nov 2009
  • None
  • GTANet Contribution Award [Newbie Guide]
    Most Improved 2010

#2

Posted 07 July 2013 - 04:25 PM

Best would be to ask for this in the Request Mod Thread. icon14.gif

toonskull
  • toonskull

    Necromancer

  • Members
  • Joined: 04 Aug 2009

#3

Posted 08 July 2013 - 12:53 AM

QUOTE (AB0333 @ Sunday, Jul 7 2013, 12:25)
... I want a checkpoint mission template.

Cleo and Main SCM is a very big difference in the fact that Cleo scripts don't recompile the whole Main.scm.


CODE
{$VERSION 3.1.0027}
{$CLEO .cs}
thread 'OnFoot'
//Let's start with how to make a icon on your map. 53 is the race icon
//and 2492.8933 -1658.8108 13.3491 is in front of Sweet's house
04CE: 1@ = create_icon_marker_without_sphere 53 at 2492.8933 -1658.8108 13.3491
//Next all your mission scripts should have this block to check that you are not currently
//on a mission, that you are outside, and that you exist in the game.
:OnFoot_19
wait 0
if
 $ONMISSION == 0
jf @OnFoot_19
if
 $Active_Interior == 0
jf @OnFoot_19
if
  Player.Defined($PLAYER_CHAR)
jf @OnFoot_19
if
  Player.Controllable($PLAYER_CHAR)
jf @OnFoot_19
//Now the very last check is if the player is standing in the starting location.
if
00FE:   actor $PLAYER_ACTOR sphere 1 in_sphere 2492.8933 -1658.8108 13.3491  radius 2.0 2.0 10.0  
jf @OnFoot_19
//Now we add a check point at 2296.8933 -1658.8108 14.6798
//There are different types of checkpoints for example;
//018A: 2@ = create_checkpoint_at 2296.8933 -1658.8108 14.6798 appears on radar as a blip
//but I am only going to use...
06D5: 2@ = create_racing_checkpoint_at 2296.8933 -1658.8108 14.6798 point_to 2492.8933 -1658.8108 13.3491 type 0 radius 3.0
//It points back at the start but could point anywhere you want, even another checkpoint.
//At this point you want to make sure the player is on foot when they reach the checkpoint...
:OnFoot_100
wait 0
if
00ED:   actor $PLAYER_ACTOR 0 near_point 2296.8933 -1658.8108 radius 3.0 3.0 on_foot
jf @OnFoot_100
//ok you made it to the check point  type 2 is a finisher
06D6: disable_racing_checkpoint 2@
06D5: 3@ = create_racing_checkpoint_at 2492.8933 -1658.8108 13.3491 point_to 0.0 0.0 0.0 type 2 radius 3.0

:OnFoot_200
wait 0
if
00ED:   actor $PLAYER_ACTOR 0 near_point 2492.8933 -1658.8108 radius 3.0 3.0 on_foot
jf @OnFoot_200
//All done give the man a cookie!
//wait 10 seconds before reset
wait 10000
jump @OnFoot_19


Might not be perfect but should get you started.

AB0333
  • AB0333

    ___________

  • BUSTED!
  • Joined: 29 Jul 2009

#4

Posted 08 July 2013 - 08:46 AM

Dude, that's not only a template - it's a f*cking tutorial! Thanks a million bro, just what I wanted! cookie.gif cookie.gif




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users