Exp for mmorpg

Have any questions in making your game, subscribing and/or using our software? Post here.
Forum rules
Make sure you are using the newest version. This can be downloaded at the top of the site via the "downloads" link.

If you are getting an bug or error, please report it to the Bug and Error Reporting forum section instead.

Use a very good subject. "Problem" or "Help" are unacceptable titles.

Use the search feature before posting a question, as the answer is probably already here.
NinjaDog
001 Subscriber
 
Joined: Fri May 27, 2016 5:14 pm

Exp for mmorpg

Postby NinjaDog » Sun Dec 03, 2017 4:22 pm

hiya

i been trying to make an actor give exp when i have spoken to him but have failed to do so atm i keep getting errors any in sight on how to do this within mmo template be good plz

best regards

User avatar
noeneto123
Distinguished 001 Member
 
Joined: Sat Apr 16, 2011 11:39 am
Location: Brazil

Re: Exp for mmorpg

Postby noeneto123 » Wed Dec 06, 2017 11:55 pm

To give exp through the network u might use the Send Experience event, it can be found in the network events section under Server>Player Management folder. Also, remember that this event should be used only with the server, not with the clients, I don't know how u want to use it but if the player triggers it, you will need a new network event. It's quite simple do that, in network events, click in the new button, name the new event as you wish, add a new parameter and name it as "NP_Amount", check the Number circle and uncheck "Server can send this to clients". Now you shall click in edit script, find the Add Experience custom event and use it, in the P Client ID parameter, write this: Main.RemoteClient and in the P Amount write: NP_Amount.

Your new event must be like this one:
ss161.png
ss161.png (3.27 KiB) Viewed 60 times


Once it done, you're already to give exp to the player by using this event in the client

User avatar
Mr.Numbers
001 Support
 
Joined: Wed Feb 28, 2007 1:50 am
Location: Alberta, Canada

Re: Exp for mmorpg

Postby Mr.Numbers » Thu Dec 07, 2017 12:43 am

You do not need to create any networking messages. This is quite a simple task, first you need to create a "Dynamic Server Actor" which is described more here:
http://www.engine001.com/wiki/mmorpg#dynamic_server_actor

On the left side of the scripting where you put the "Server Script", you just use the "Add Experience" Custom Event. This is located under Custom Events > Server > Player Management

The parameter "P_Client_ID" should be set to:
Code: Select all
Actor("relate").Variable("Client_ID")

And the parameter "P_Amount" should be set to whatever you want to increase the EXP by.
Image
I AM THE ALL MIGHTY SCRIPTING MASTER
Please do not PM me with Engine 001 related questions, rather post on the forums. ;)


Return to Technical Support Questions

Who is online

Users browsing this forum: No registered users