fodev.net

FOnline Development => Questions and Answers => Topic started by: Mr Feltzer on January 31, 2011, 05:39:12 am

Title: SDK Questions Thread
Post by: Mr Feltzer on January 31, 2011, 05:39:12 am
well I Have some questions, And Im sure Other people do so heres the Thread to Post Them!

Okay My Biggest Question is this, This Might require alot of Code, But Just give me a "reference point" or anything that I Can do to Find out how to Follow this up
How Can I Spawn an NPC From a Certain Team and Certain coordinates,

So I Make a Script
Throw in the Code, and As Soon as the Server Opens up, The Script is Executed and the NPC's Are Spawned, and Are Automaticly Respawned
Title: Re: SDK Questions Thread
Post by: Mr Feltzer on January 31, 2011, 09:45:25 am
well I Have some questions, And Im sure Other people do so heres the Thread to Post Them!

Okay My Biggest Question is this, This Might require alot of Code, But Just give me a "reference point" or anything that I Can do to Find out how to Follow this up
How Can I Spawn an NPC From a Certain Team and Certain coordinates,

So I Make a Script
Throw in the Code, and As Soon as the Server Opens up, The Script is Executed and the NPC's Are Spawned, and Are Automaticly Respawned

Now I Just need to Know How to make an NPC Spawned on Mapper to be Hostile
Title: Re: SDK Questions Thread
Post by: raynor009 on January 31, 2011, 02:32:07 pm
learn c++ and c#
Title: Re: SDK Questions Thread
Post by: Mr Feltzer on January 31, 2011, 09:56:20 pm
learn c++ and c#

Dont be a Dick, I Have been scripting for 3 Years And I Need to know the Function Code, Where Can I Find it or What is it?
Title: Re: SDK Questions Thread
Post by: Mayck on January 31, 2011, 10:23:07 pm
I'd try to using "void Map::SetEvent(int  eventType, string&  funcName)" function
where you use MAP_EVENT_IN_CRITTER ( =critter enters map) as the "eventType" value
and "funcName" is name of your own function used to handle the event (I'm not sure what arguments it should have, try looking in the documentation)

and then try to use this in the handling function(it should add the critter to the npc's enemy list):
void Critter::AddEnemyInStack(uint critterId)
Title: Re: SDK Questions Thread
Post by: Mr Feltzer on January 31, 2011, 11:14:49 pm
wheres the documentation?
Title: Re: SDK Questions Thread
Post by: Mayck on January 31, 2011, 11:51:23 pm
Docs folder in the SDK