edited February 2015 in ORK Scripting
ok so i got hit with a whammy yesterday at work and i need to pull info from events. so i have a bunch of question's some scripting some not. ( sorry gil.. just trying to pin point what i can and cant use over photon from ork. so ill be bombarding you with questions every now and then :/ )

1 how do i go about sending info from a event to a script and or playmaker fsm?( if possible can i get a small tut on this part even if its a simple changing a public var in a script would be cool!)

2. how would i go about pulling information from a save file?

3. is it possible to use the event system to control things that are not spawned through ork?

4.the day and night cycle tut haven't read through it just yet but does this allow for implementation of controlling say a directional light as the sun by say using way points to move the directional light across the sky?

5. the save system ork uses is it possible to load up the save system in its own scene to say use it as a character select screen . be something like a character select screen from a mmorpg.. they would get a list of all characters that they have made or what ever but those buttons are the actual save file listings. and of course if no character saves they can just load up the game.... ( i believe im just over thinking this one and i can do it with just a basic setup.


6. i also need to do something like this. photon works as a room base rooms fill up depending on how many characters are allowed to join a room. now lets say i create a room that means im the master client e.g. the host. so now im level 3 next person joins the room there level ten now i send a message to that client that the master client is level 3 and i then set the clients character to level 3. now to do this i would have to send to set a public var in a wrapper script to send a message to ork to reset the level accordingly. now will this adjust all of the characters status developments automatically?

and if that host leaves will i be able to readjust levels depending on the characters level?

and then lets say i stored all the xp gained while they were stuck at level 3 weather they leveled up or not. would i be able to add that xp back in to the characters pool after resetting the characters level back to 10 and if enough xp was added allow them to level up as necessary?

7, also on autosaves is it possible to set autosaves to save by event? and to do 2 saves for this ? reason being i need to be able to load up full games on room creation. so i want to be able to give them the option to either load up a new game or start from where they left off . i guess this is more of is it possible to limit what gets saved and what does not get saved? havent really looked at orks save system yet so im wondering if this is possible. to have it save 2 times so i can have a character save and a world save.


thats it for now... sorry for all the questions this is something my boss is working out so we can figure out what is possible and what is not possible with using ork and photon togther.
new website can be found here http://www.fore-loregames.com

Follow the game Development on Twitter https://twitter.com/Fore_Lore_Games

or check out the face book page here https://www.facebook.com/ForeLoreGames
  • 1) The how-to on game variables has all the info regarding scripting (bottom part).
    Also, the Call Function step (and other function steps) can be used to communicate with other scripts.

    2) By changing code in ORK's save system, or loading the file yourself and interpret the content :)
    Check the SaveGameHandler class for how this is done.

    3) Sure, using the Object actors with Find Object enabled, or using the Found Objects that can be searched with the Search Object step.

    4) Can also be done with additional events that are based on the game variables used for the custom time system. The tutorial only explains the concept of creating your own time system in the game - once you have that, you can use it in other events, e.g. for moving your light.

    5) Not without custom scripting. Generally, when you're going MMO, you probably don't want to use ORK's save game system. E.g. you can pull the data of the player's combatant through the SaveGame function of the combatant. It'll get you a DataObject class filled with the data, which can be converted into an XML string by calling the GetDataFile function (which gets you another class with the xml data).

    6) There's even an event step for that: Initialize to Level
    And yes, that'll reset all stats and revert the combatant back to the lower level. Or higher level - similar to creating a new combatant.
    Adding experience works just like every other status value - you can do it through scripting, event system and the usual way (killing stuff). When changing the exp stat, the combatant will also level up.

    7) There are various options for what is saved in Menus > Save Game Menu. E.g. you can set the system up to not save the player's position and always start from a defined scene.
    Generally, like I said before, I think it'll be better for an MMO game if you don't use ORK's save game system as a whole. The system works using the ISaveData interface, so you're able to pull the data from pretty much everything that currently can be saved. E.g. calling the SaveGame function on the combatant will get all the combatant's stats, abilities, equipment and inventory. Through converting them into XML strings, you can conveniently store them in a database :)
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • as always you rock man thanks for the info !
    new website can be found here http://www.fore-loregames.com

    Follow the game Development on Twitter https://twitter.com/Fore_Lore_Games

    or check out the face book page here https://www.facebook.com/ForeLoreGames
Sign In or Register to comment.