Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Can an NPC spawn another NPC as a spell?


Fluffy
 Share

Recommended Posts

@Akio:

> Yes, YOU "can" code that.

![](http://www.freemmorpgmaker.com/files/imagehost/pics/c85881b4cf5ca72f84100a65194669f9.png)

The word "can" is not in this proper use here. Can is a word for could do. But this person might not even know how to code. Code is not a can thing to do. Insted of can you could say learning.
Link to comment
Share on other sites

You're a troll…  And I'm pretty sure CAN means that it is possible. Such as i CAN go to the bathroom. I CAN do this, I CAN do that, etc. And what he is looking to do isn't really coding, because all he has to do is look at the code and move things around... Not doing much himself, so before you try to 'correct' me, learn what you are talking about.
Link to comment
Share on other sites

@(-_-):

> You're a troll…  And I'm pretty sure CAN means that it is possible. Such as i CAN go to the bathroom. I CAN do this, I CAN do that, etc. And what he is looking to do isn't really coding, because all he has to do is look at the code and move things around... Not doing much himself, so before you try to 'correct' me, learn what you are talking about.

In his defense trolls are not very educated. Anyways as for the whole npc thing. You can just program an action that makes it spawn a npc you have set already within a distance of the original one. Most of the code can actually be ripped from the original spawn code. Should not be too hard of a edit.
Link to comment
Share on other sites

@Captain:

> Hey shut the duck up. You're not helping anyone. He wants to know how to do it, saying that is useless.

Thank you.
so can someone tell me how to program that? im useless in coding so i would find it helpful if someone could PM me the code. :)
Link to comment
Share on other sites

No need for war. People have already been warned.

@Fluffy:

> Thank you.
> so can someone tell me how to program that? im useless in coding so i would find it helpful if someone could PM me the code. :)

Or, we could help you learn how to do it yourself, which is much more rewarding. ;)

Things you'll need to do:

* Allow NPCs to cast spells instead of attacking.
* Add this as a new spell type. You might want to let yourself pick which NPC the spell will spawn.
* Add a new variable to NpcRec determining if they have spawned an NPC (0 if not, otherwise, the slot the NPC is in). For the purposes of this guide, this variable will be called Minion.
* Loop through the NPCs on the map and find a free slot. Assign it to Npc(NpcNum).Minion.
* Look nearby for a spot free of blocks and assign these to two variables, MinionX and MinionY (you do NOT need to add this to NpcRec, they can be normal variables).
* Spawn the NPC (look at the existing spawn code) at the specified location.

If you need any help along the way, just post here and we'll help you. It may seem hard, but it's actually not that complicated.
Link to comment
Share on other sites

NPCRec is basically a template that every NPC follows. It contains stuff like their Sprite, Strength, how much experience when they die, their name, and more. It's located both server-side and client-side, you can find it with Control-F for Type NpcRec in the entire project.

Then you can add Minion As Long before End Type, which will tell Eclipse Origins that you want every NPC to have another variable called Minion As Long. You can then set it appropriately.
Link to comment
Share on other sites

@Soul:

> NPCRec is basically a template that every NPC follows. It contains stuff like their Sprite, Strength, how much experience when they die, their name, and more. It's located both server-side and client-side, you can find it with Control-F for Type NpcRec in the entire project.

Where do i press control-f? iv tired it but nothing happens :/ and ty for helping with this, even though its painstakingly slow to get the message across to me xD
Link to comment
Share on other sites

@Fluffy:

> Where do i press control-f? iv tired it but nothing happens :/ and ty for helping with this, even though its painstakingly slow to get the message across to me xD

You press it while in Visual Basic 6 and inside a module (that is, you are in a window with text),

If your question is where is control + f, this might help:
![](http://www.freemmorpgmaker.com/files/imagehost/pics/66aa08a6b856c49a44066680e220ff55.png)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...