[Solved] Put a certain NPC in a block

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

Super Mario Player M
Topic author, Duke
Duke
Avatar
Super Mario Player M
Topic author, Duke
Duke
Age: 23
Reputation: 30
Posts: 141
Joined: 23 Jun 2016
Location: Planet Earth
Youtube channel URL Tencent QQ

Post #1by Super Mario Player » 2 Oct 2016, 19:55

Is it possible to put an NPC in a block via TeaScript? Because when I type a certain number as the value of Block(id).advset, it puts the same number of coins in the block instead of putting the NPC with this type ID.
Last edited by Super Mario Player on 31 Oct 2016, 16:28, edited 1 time in total.
My current project:
Spoiler
The Tower of Challenges

Languages (for PMs):

Image

YouTube channel:
Image
Image

Alvespires M
Count
Count
Alvespires M
Count
Count
Age: 23
Reputation: 17
Posts: 228
Joined: 20 Aug 2016
Location: Koopa Troopa Beach

Post #2by Alvespires » 3 Oct 2016, 3:49

Use call Tcreate(unlikely because you told that dislike using Tcreate)
Not really up to it.

Super Mario Player M
Topic author, Duke
Duke
Avatar
Super Mario Player M
Topic author, Duke
Duke
Age: 23
Reputation: 30
Posts: 141
Joined: 23 Jun 2016
Location: Planet Earth
Youtube channel URL Tencent QQ

Post #3by Super Mario Player » 3 Oct 2016, 10:25

Alvespires wrote:Use call Tcreate(unlikely because you told that dislike using Tcreate)
So there is no way I can put a NPC in a block... Thanks for the tip.
My current project:
Spoiler
The Tower of Challenges

Languages (for PMs):

Image

YouTube channel:
Image
Image

4matsy M
Honourable citizen
Honourable citizen
Avatar
4matsy M
Honourable citizen
Honourable citizen
Age: 42
Reputation: 15
Posts: 43
Joined: 11 Jul 2014
Skype

Post #4by 4matsy » 3 Oct 2016, 13:46

Hmmm.

Try using negative numbers instead. Like, the NPC number of whatever you want to put in the block, but negative. See if that works.
:D

Super Mario Player M
Topic author, Duke
Duke
Avatar
Super Mario Player M
Topic author, Duke
Duke
Age: 23
Reputation: 30
Posts: 141
Joined: 23 Jun 2016
Location: Planet Earth
Youtube channel URL Tencent QQ

Post #5by Super Mario Player » 3 Oct 2016, 21:42

4matsy wrote:Hmmm.

Try using negative numbers instead. Like, the NPC number of whatever you want to put in the block, but negative. See if that works.
It still doesn't work :SOS:

EDIT: I solved the problem by myself. So, for this topic not to be absolutely useless: to put an NPC in a block, set the .advset value of this block to 1,000 (one thousand) plus the type-ID of the NPC. For example, type 1,009 for a SMB3 Mushroom.
My current project:
Spoiler
The Tower of Challenges

Languages (for PMs):

Image

YouTube channel:
Image
Image


Return to “TeaScript”

Who is online (over the past 5 minutes)

Users browsing this forum: 3 guests