[SOLVED] Little help please

Description: Internal scripting system of SMBX-38A Engine based on the simple VB-like language
Moderators: Lx Xzit, Yoshi021, 5438A38A, Semi-moderatos, Moderators

Maeru
Topic author, Nice citizen
Nice citizen
Maeru
Topic author, Nice citizen
Nice citizen
Reputation: 0
Posts: 11
Joined: 7 Aug 2016

Post #1by Maeru » 25 Feb 2017, 18:24

So I want to do an npc (here npc-128) when it falls into the water, it is replaced by another npc (here npc-165) in fact I want to do it because the npc-128 is "in fire" and I would like it to make a lava sound, maybe a script can help me

Sorry for my bad english

Maeru
Last edited by Maeru on 25 Feb 2017, 22:38, edited 1 time in total.
Sorry for my bad english, I'm french.

Yoshi021 M
Moderator
Moderator
Avatar
Yoshi021 M
Moderator
Moderator
Age: 22
Reputation: 170
Posts: 693
Joined: 15 Feb 2016
Location: Yoshi's Island

Post #2by Yoshi021 » 25 Feb 2017, 18:37

You can do:

Code: Select all

with npc(sysval(param1))
  if .inwater then
    .id = 1    
  end if
end with

Change the 1 to the id you want your NPC to turn into.
Links
ImageImageImage
Image
Image
"Going to University is FUN!" :pardon:

Maeru
Topic author, Nice citizen
Nice citizen
Maeru
Topic author, Nice citizen
Nice citizen
Reputation: 0
Posts: 11
Joined: 7 Aug 2016

Post #3by Maeru » 25 Feb 2017, 18:45

Thanks but how do i do the lava noise event ?
Sorry for my bad english, I'm french.

Yoshi021 M
Moderator
Moderator
Avatar
Yoshi021 M
Moderator
Moderator
Age: 22
Reputation: 170
Posts: 693
Joined: 15 Feb 2016
Location: Yoshi's Island

Post #4by Yoshi021 » 25 Feb 2017, 20:35

Code: Select all

with npc(sysval(param1))
  if .inwater then
    .id = 1    
   call AudioSet(2, 16, 0, "")
  end if
end with
Links
ImageImageImage
Image
Image
"Going to University is FUN!" :pardon:

Maeru
Topic author, Nice citizen
Nice citizen
Maeru
Topic author, Nice citizen
Nice citizen
Reputation: 0
Posts: 11
Joined: 7 Aug 2016

Post #5by Maeru » 25 Feb 2017, 20:42

Thaks a lot ;-)
Sorry for my bad english, I'm french.


Return to “TeaScript”

Who is online (over the past 5 minutes)

Users browsing this forum: 1 guest