[Added in Patch 22] [TEA-SCRIPT] char(1).grabbing

Description: Have any suggestions or new ideas for SMBX-38A? This is a place for you. Good suggestions may appear in future versions of SMBX-38A.
Moderators: Yoshi021, Lx Xzit, 5438A38A, Semi-moderatos, Moderators

Victor ManuelMR
Topic author, Good citizen
Good citizen
Avatar
Victor ManuelMR
Topic author, Good citizen
Good citizen
Reputation: 17
Posts: 32
Joined: 7 Feb 2018

Post #1by Victor ManuelMR » 1 Sep 2019, 20:15

Add the ".grabbing" property to players [Read Only],if the player is holding an NPC. This value will be the NPC ID the player is holding, otherwise it will be 0


Example: If the player is holding a Key(NPC-31) then the value will be 31. [Char(1).grabbing = 31]

Exemple 3.png


Exemple.png
Exemple.png (9.19 KiB) Viewed 516 times


Exemple 2.png
Exemple 2.png (8.11 KiB) Viewed 516 times



The ".grabbing" It would be very useful to create specific NPCs such as an NPC that makes the coins go to the player.


UPDATE :
To use the function :val(Grabbing) = npc(char(1).grabbing).id
Last edited by Victor ManuelMR on 22 Sep 2019, 17:15, edited 3 times in total.

Eri7 M
Viscount
Viscount
Avatar
Eri7 M
Viscount
Viscount
Age: 18
Reputation: 83
Posts: 329
Joined: 19 Dec 2016
Location: Germany , Bonn

Post #2by Eri7 » 1 Sep 2019, 23:11

I agree with this suggestion, we need this!
Join the discord server about Nova Projects.
Image

Image

NESTED ERNEST M
Duke
Duke
Avatar
NESTED ERNEST M
Duke
Duke
Reputation: 14
Posts: 127
Joined: 23 Sep 2017
Location: Perú, Lima
Website

Post #3by NESTED ERNEST » 22 Sep 2019, 17:01

v(Grabbing)=npc(char(1).grabbing).id
Programming NPCs in SMBX-38A is fun:

ROCKMAN GIF IN SMBX 38A

Image

Victor ManuelMR
Topic author, Good citizen
Good citizen
Avatar
Victor ManuelMR
Topic author, Good citizen
Good citizen
Reputation: 17
Posts: 32
Joined: 7 Feb 2018

Post #4by Victor ManuelMR » 22 Sep 2019, 17:12

NESTED ERNEST wrote:v(Grabbing)=npc(char(1).grabbing).id

Thank you very much =D


Return to “Ideas & Suggestions”

Who is online (over the past 5 minutes)

Users browsing this forum: 23 guests