question with Importing stuff

All other Source.Python topics and issues.
Simonas1122
Junior Member
Posts: 1
Joined: Mon Mar 09, 2020 2:57 pm

question with Importing stuff

Postby Simonas1122 » Mon Mar 09, 2020 3:05 pm

I'm beginner and i can't find how to import stuff like messages or events they just don't appear it would be good if i had "auto-finish" on my visual studio code can anyone help? sorry for bad english...
User avatar
L'In20Cible
Project Leader
Posts: 1533
Joined: Sat Jul 14, 2012 9:29 pm
Location: Québec

Re: question with Importing stuff

Postby L'In20Cible » Tue Mar 10, 2020 11:23 am

Simonas1122 wrote:I'm beginner and i can't find how to import stuff like messages or events they just don't appear it would be good if i had "auto-finish" on my visual studio code can anyone help? sorry for bad english...

You can look at the Module Index. For example, messages are imported from messages and events from events:

Syntax: Select all

from events import Event
from messages import SayText2

something_msg = SayText2('Something happened!')
something_else_msg = SayText2('Something else happened!')

@Event('some_game_event')
def some_event(game_event):
if game_event['some_event_variable']:
something_msg.send()
else:
something_else_msg.send()

Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 41 guests