-
May 13th, 2021, 06:09 #1
Can "Rolls" be accessed from LUA to ... roll?
I think I recall Damned saying that the only way to roll rolls was pressing the button. If so, that is fine - I will try creating my first non MC roll later . But I figured I'd check.
Basically, I will have a /swsave that get's it's target number programatically based on race/class/level and some situational factors. That's fine for when I want them to manually trigger it. But I already coded a /swspell that either says X casts y or it says that and rolls damage dice either static or level based. I figure I could add to that that it triggers a save roll on the target(s) but not sure if can work it to use the /swsave or if need to do my own non MC action for that.
If know of examples if it IS allowed, feel free to name em.
-
May 13th, 2021, 06:12 #2
Supreme Deity
- Join Date
- Mar 2007
- Posts
- 20,563
If you are using the CoreRPG roll actions system internally, then you can use ActionsManager.performAction with a nil for the draginfo parameter. (See 5E for many examples.)
If you want to access the API directly, and manage yourself; there is a Comm.throwDice API call.
Regards,
JPG
-
May 13th, 2021, 13:30 #3
Just have a look at the code that runs when the Roll button is clicked.
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks