Jump to content
View in the app

A better way to browse. Learn more.

GTAGames.nl - De Nederlandse Grand Theft Auto Community!

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

if and else_jump

Hey

In volgende code:

:SARAH_ATTACKED
wait 0 ms
if NOT actor.Dead($SARAH)
else_jump @MISSION_11_FAIL
if and
  actor.Dead($HOSPI_1)
  actor.Dead($HOSPI_2)
  actor.Dead($HOSPI_3)
else_jump @SARAH_ATTACKED

Hier moeten HOSPI_1, HOSPI_2 en HOSPI_3 dood zijn vooralleer de missie verder gaat. Hoe kan ik ervoor zorgen dat maar één van de parameters nodig is om verder te gaan, dus dat HOSPI_1, HOSPI_2 of HOSPI_3 dood is?

Groeten

Leumas

Featured Replies

De loop anders maken.

:SARAH_ATTACKED

wait 0 ms

if NOT actor.Dead($SARAH)

else_jump @MISSION_11_FAIL

if and

actor.Dead($HOSPI_1)

else_jump @hospi2

:hospi2

if and

actor.Dead($HOSPI_2)

else_jump @hospi3

:hospi3

if and

actor.Dead($HOSPI_3)

else_jump @SARAH_ATTACKED

Al heb ik dit niet getest en is mijn SCM helemaal verroest :7 , maar als ik het me allemaal wel goed herinner kan het zo goed zijn.

Sorry Beesje, maar ik moet je verbeteren. :puh:

>>> Door DaBeast: Ach, mislukte poging van me ook, ik ben kansloos tegen jou 1337 coding kunsten :7

Ten eerste: if and is onlogisch met maar 1 conditie...

Ten tweede:

if and 
 actor.Dead($HOSPI_1)
else_jump @label
:label

Dit is nogal onlogische constructie, je jumpt namelijk nooit naar het volgende label. Dan zou ik het als volgt maken:

if
  actor.Dead($HOSPI_1)
then
  jump @... (label na de lus)
end

En dat ook voor de tweede en derde "hospi".

Ten derde...

Je doet echt veel te moeilijk. Alles wat je hoeft te doen is "and" in "or" veranderen. :puh:

:SARAH_ATTACKED
wait 0 ms
if NOT actor.Dead($SARAH)
else_jump @MISSION_11_FAIL
if or
  actor.Dead($HOSPI_1)
  actor.Dead($HOSPI_2)
  actor.Dead($HOSPI_3)
else_jump @SARAH_ATTACKED

  • Author
Sorry Beesje, maar ik moet je verbeteren. :puh:

Ten eerste: if and is onlogisch met maar 1 conditie...

Ten tweede:

if and 
 actor.Dead($HOSPI_1)
else_jump @label
:label

Dit is nogal onlogische constructie, je jumpt namelijk nooit naar het volgende label. Dan zou ik het als volgt maken:

if
  actor.Dead($HOSPI_1)
then
  jump @... (label na de lus)
end

En dat ook voor de tweede en derde "hospi".

Ten derde...

Je doet echt veel te moeilijk. Alles wat je hoeft te doen is "and" in "or" veranderen. :puh:

:SARAH_ATTACKED
wait 0 ms
if NOT actor.Dead($SARAH)
else_jump @MISSION_11_FAIL
if or
  actor.Dead($HOSPI_1)
  actor.Dead($HOSPI_2)
  actor.Dead($HOSPI_3)
else_jump @SARAH_ATTACKED

Thanks

Het was eigenlijk zo simpel dat ik er niet aan dacht...

Groeten

Leumas

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.