sysval(pcount)

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: Lx Xzit, Yoshi021, 5438A38A, Semi-moderatos, Moderators

Yoshi021 M
Topic author, Moderator
Moderator
Avatar
Yoshi021 M
Topic author, Moderator
Moderator
Age: 20
Reputation: 163
Posts: 692
Joined: 15 Feb 2016
Location: Yoshi's Island

Post #1by Yoshi021 » 17 Aug 2020, 6:05

sysval(pcount) would returns the total amount of active players, including those made by supermario64 cheats.
Links
ImageImageImage
Image
Image
"Going to University is FUN!" :pardon:

Victor ManuelMR M
Marquis
Marquis
Avatar
Victor ManuelMR M
Marquis
Marquis
Age: 19
Reputation: 99
Posts: 194
Joined: 7 Feb 2018

Post #2by Victor ManuelMR » 17 Aug 2020, 7:25

Yoshi021 wrote:sysval(pcount) would returns the total amount of active players, including those made by supermario64 cheats.

Why the suggestion?
Last edited by Victor ManuelMR on 4 Sep 2020, 3:35, edited 1 time in total.
Image
[1.4.5] - Dream Team at The Challenging Portals:
Image

Void M
Bat
Bat
Avatar
Void M
Bat
Bat
Age: 18
Reputation: 88
Posts: 270
Joined: 18 Apr 2014
Location: [REDACTED]

Post #3by Void » 4 Sep 2020, 0:12

Victor ManuelMR wrote:
Yoshi021 wrote:sysval(pcount) would returns the total amount of active players, including those made by supermario64 cheats.

Why the suggestion?
Why the big text?
Although I do somewhat agree with Victor, the only way to even add active players aside from player 1 and 2 IS through using the cheat codes, which do disable saving.
Join the SMBX 38a Discord Server!
Image

sweep a leaf sweep away a troubles

NESTED ERNEST M
Count
Count
Avatar
NESTED ERNEST M
Count
Count
Reputation: 71
Posts: 261
Joined: 23 Sep 2017
Location: Perú, Lima
Website

Post #4by NESTED ERNEST » 10 Sep 2020, 2:14

In terms of optimization it is very good. In a normal 'For' loop you would have to do 128 iterations necessarily to cover all players:
For v(i)=1 to 128
if char(val(i)).alive=1 then
'scripts
end if
next

But with that suggestion, this loop would be faster.
For v(i)=1 to sysval(pcount)
next

I hope I have understood the suggestion well.
Programming NPCs in SMBX-38A is fun:
That is me
Image
Image
Image
Image

ROCKMAN GIF IN SMBX 38A

Image


Return to “Ideas & Suggestions”

Who is online (over the past 5 minutes)

Users browsing this forum: 1 guest