Dear forum users! In compliance with the new European GDPR regulations, we'd just like to inform you that if you have an account, your email address is stored in our database. We do not share your information with third parties, and your email address and password are encrypted for security reasons.

New to the forum? Say hello in this topic! Also make sure to read the rules.

Need Help With Scripting

Share questions, scripts and tutorials related to the ScriptAPI in SFD.
Forum rules
By using the forum you agree to the following rules.
Post Reply
MrWheatley
Fighter
Fighter
Posts: 11
Joined: Wed Jun 06, 2018 7:36 am

Need Help With Scripting

Post by MrWheatley » Sun Jun 10, 2018 10:27 pm

How would you make a list of tiles that can be separated with slots 1-4 and cycled through using walk + block + facing direction, and can be called on using my script?

https://pastebin.com/jV4p7bV9

I tried to make a script to spawn to spawn every thing in the game, but got stuck here, I just need what I said before, I'll fill out everything myself.


(I had to use pastebin because I kept getting
No route found for "GET /posting.php" (from "https://www.mythologicinteractiveforums ... =post&f=15")
when trying to paste the code here)
0 x

User avatar
JakSparro98
Superfighter
Superfighter
Posts: 327
Joined: Fri Jul 15, 2016 7:56 pm
Started SFD: PreAlpha 1.0.5
Location: Rome, Italy
Gender:
Age: 19

Post by JakSparro98 » Mon Jun 11, 2018 9:08 pm

MrWheatley wrote:
Sun Jun 10, 2018 10:27 pm
How would you make a list of tiles that can be separated with slots 1-4 and cycled through using walk + block + facing direction, and can be called on using my script?

https://pastebin.com/jV4p7bV9

I tried to make a script to spawn to spawn every thing in the game, but got stuck here, I just need what I said before, I'll fill out everything myself.


(I had to use pastebin because I kept getting
No route found for "GET /posting.php" (from "https://www.mythologicinteractiveforums ... =post&f=15")
when trying to paste the code here)
So if I've understood, you want to cycle through objects by using alt + block button and if your player is facing at right go next object, instead if is facing at left go previous object, it is correct?
0 x

MrWheatley
Fighter
Fighter
Posts: 11
Joined: Wed Jun 06, 2018 7:36 am

Post by MrWheatley » Mon Jun 11, 2018 9:54 pm

JakSparro98 wrote:
Mon Jun 11, 2018 9:08 pm
MrWheatley wrote:
Sun Jun 10, 2018 10:27 pm
How would you make a list of tiles that can be separated with slots 1-4 and cycled through using walk + block + facing direction, and can be called on using my script?

https://pastebin.com/jV4p7bV9

I tried to make a script to spawn to spawn every thing in the game, but got stuck here, I just need what I said before, I'll fill out everything myself.


(I had to use pastebin because I kept getting
No route found for "GET /posting.php" (from "https://www.mythologicinteractiveforums ... =post&f=15")
when trying to paste the code here)
So if I've understood, you want to cycle through objects by using alt + block button and if your player is facing at right go next object, instead if is facing at left go previous object, it is correct?
Yeah, it'll be kinda like this; http://sfdmaps.at.ua/load/scripts/compl ... 10-1-0-119
0 x

User avatar
JakSparro98
Superfighter
Superfighter
Posts: 327
Joined: Fri Jul 15, 2016 7:56 pm
Started SFD: PreAlpha 1.0.5
Location: Rome, Italy
Gender:
Age: 19

Post by JakSparro98 » Tue Jun 19, 2018 7:37 pm

MrWheatley wrote:
Mon Jun 11, 2018 9:54 pm
Yeah, it'll be kinda like this; http://sfdmaps.at.ua/load/scripts/compl ... 10-1-0-119
Will this feature be used by multitple players? after that information I can start write the script.
0 x

MrWheatley
Fighter
Fighter
Posts: 11
Joined: Wed Jun 06, 2018 7:36 am

Post by MrWheatley » Wed Jun 20, 2018 3:20 am

JakSparro98 wrote:
Tue Jun 19, 2018 7:37 pm
MrWheatley wrote:
Mon Jun 11, 2018 9:54 pm
Yeah, it'll be kinda like this; http://sfdmaps.at.ua/load/scripts/compl ... 10-1-0-119
Will this feature be used by multitple players? after that information I can start write the script.
Yeah, just two though.
0 x

User avatar
JakSparro98
Superfighter
Superfighter
Posts: 327
Joined: Fri Jul 15, 2016 7:56 pm
Started SFD: PreAlpha 1.0.5
Location: Rome, Italy
Gender:
Age: 19

Post by JakSparro98 » Tue Jun 26, 2018 7:19 pm

Here is the script, it's map-independent but I preferred to leave it in the test map because the player has been provided with weapons for the slots 1-4 since the only way to call slot keys events is to fill the invetory with something to actually use, the weapons are sheathed soon after though.

On the top of the script you will find the string with the names of the lists and for each list a set of objects names and displayed names, you can add all items you want, just add a new element at the bottom of the list like so:

Code: Select all

 {"Third Element","WoodBarrel00"}, // add a comma to the previous line before adding the new element
//new element
{"New Element","Balloon00"}
1 x

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest