FAQFAQ    Board RulesBoard Rules    SearchSearch    LotteryLottery    RouletteRoulette    UsergroupsUsergroups
     RegisterRegister  ProfileProfile    Log in to check your private messagesLog in to check your private messages    Shop    Log inLog in 
View posts since last visitView your postsView unanswered posts

event-command?

 
Post new topic   Reply to topic    Mafiascene.com Forum Index -> Ask a Modder - Modding
View previous topic :: View next topic  
Author Message
Frog_808

New Member
New Member


Joined: 13 May 2020
Posts: 20

55 Bank Notes
Items

PostPosted: Fri Mar 19, 2021 7:29 pm    Post subject: event-command? Reply with quote

Hello,
can someone tell me what the "event" command in the script does?
The script reference says "subroutine", but that tells me nothing.
I would be very grateful.
Back to top
View user's profile Send private message
AsaSK

Mafiascene Veteran Modder
Mafiascene Veteran Modder


Joined: 24 Feb 2013
Posts: 794
Location: London, England
12028 Bank Notes
Items

PostPosted: Fri Mar 19, 2021 7:47 pm    Post subject: event-command? Reply with quote

Hi Frog,

The 'event'/'setevent' command is used by one script to jump to another. In script A, 'setevent' is used and in script B, 'event' is used.




Syntax:

setevent xx, yy, zz
- xx: script to jump to (actor)
- yy: event name to trigger in script xx
- zz: set to '-1'


event xx
- xx: event name




Example - script A:

Code:
dim_act 2

findactor 0, "Tommy"
findactor 1, "scriptB"

wait 1000
setevent 1, FROG, -1


Example - script B:

Code:
dim_act 1

findactor 0, "Tommy"

wait 1000
event FROG
//whatever you want to happen


There are also pre-programmed events, such as 'event use_ab', etc. Hope this helps.
_________________

The official Mafioso Mod thread
Back to top
View user's profile Send private message
Frog_808

New Member
New Member


Joined: 13 May 2020
Posts: 20

55 Bank Notes
Items

PostPosted: Fri Mar 19, 2021 8:04 pm    Post subject: event-command? Reply with quote

Oh, thank you very much!!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Mafiascene.com Forum Index -> Ask a Modder - Modding All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

Generation Time: 0.014 | Queries: 18