Quantcast

Jump to content

» «
Photo

Mission repetition

1 reply to this topic
thalilmythos
  • thalilmythos

    Vigilante.

  • Members
  • Joined: 26 Dec 2012
  • None

#1

Posted 2 weeks ago

I have a cleo mission, all good all done, but that at the end of the mission, has a gosub where there is a random integer, which loops to choose if the mission restarts or just ends there, the thing is that, when the mission restarts too many times, the game crashes, i checked actors and locals and everything removes itself when it haves to, so i wonder.

If i wanted to count how many times the mission has been done on the script how would i do it? would i just have to do this?:

[email protected] =+ 1 

everytime the mission ends and then adding an if like this:

 

:gosub
if
[email protected] == 3
jf @restart
jump @missionpassed

Or is there something else to it?




 


Sanmodder
  • Sanmodder

    Fan script

  • Members
  • Joined: 11 Sep 2017
  • Poland

#2

Posted 2 weeks ago Edited by Sanmodder, A week ago.

I have a cleo mission, all good all done, but that at the end of the mission, has a gosub where there is a random integer, which loops to choose if the mission restarts or just ends there, the thing is that, when the mission restarts too many times, the game crashes, i checked actors and locals and everything removes itself when it haves to, so i wonder.

If i wanted to count how many times the mission has been done on the script how would i do it? would i just have to do this?:

[email protected] =+ 1 

everytime the mission ends and then adding an if like this:

 

:gosub
if
[email protected] == 3
jf @restart
jump @missionpassed

Or is there something else to it?




 

 

[email protected] = 0

[email protected] = 0

:missionpassed
//wait to next

while true
    wait 0
    gosub @mission
    gosub @heck
end

:mission
//////////////
//////////////
////mission///
//////////////
//////////////
return

:heck

wait 0
if
    not [email protected] == 1
then
    [email protected] = 1
    [email protected] += 1 //licznik misji

    [email protected] = 0
end
if
    [email protected] >= 3 //licznik misji
then
    [email protected] = 0
    goto @missionpassed
end
return





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users