I'm a retard (so I ask help with stuff here)
Moderator: Developers
- woodmouse
- Monolich (Senior Member)
- Posts: 4586
- Joined: Wed Jul 23, 2008 3:53 pm
- Location: Finland
- Contact:
I'm a retard (so I ask help with stuff here)
How can I make enemies follow waypoints? I mean, is there no way to use the X and Y coordinates for that? Because it seems like random numbers when I look at the Necromancer's waypoints in Zombor starter...
And another question: How can I make an enemy (a boss) teleport to another place when he "dies", kind of like what the Dracolich does. Because I don't understand that either...
And another question: How can I make an enemy (a boss) teleport to another place when he "dies", kind of like what the Dracolich does. Because I don't understand that either...
Last edited by woodmouse on Sun Jan 16, 2011 10:10 pm, edited 2 times in total.
Once upon a time, when unicorns roamed the earth...
- Zefz
- Squirrel Knight (Administrator)
- Posts: 3820
- Joined: Wed Jul 23, 2008 1:27 am
- Location: Norway
- Contact:
Waypoints are calculated in multitudes of 128 in EgoScript. This means that each tile has a size of 128*128. To get a character to move to a specific coordinate simply do this:
Character will move to X: 28 and Y: 32.
For teleporting use the Teleport script function:
This will teleport the character to a random nearby tile up to 5 tiles away.
Code: Select all
tmpx = 28*128
tmpy = 32*128
AddWaypoint
For teleporting use the Teleport script function:
Code: Select all
tmpx = rand % 10 - 5 * 128 + selfx
tmpy = rand % 10 - 5 * 128 + selfy
tmpdistance = selfz
Teleport
- woodmouse
- Monolich (Senior Member)
- Posts: 4586
- Joined: Wed Jul 23, 2008 3:53 pm
- Location: Finland
- Contact:
Thought I'd ask in this same thread, because I don't wanna spam too many threads:
How to make a character get the [EVIL] special IDSZ? It doesn't seem to work as:
So I'm kind of confused.
How to make a character get the [EVIL] special IDSZ? It doesn't seem to work as:
Code: Select all
tmpargument = [EVIL]
GiveTargetSpecialIDSZ
Once upon a time, when unicorns roamed the earth...
- woodmouse
- Monolich (Senior Member)
- Posts: 4586
- Joined: Wed Jul 23, 2008 3:53 pm
- Location: Finland
- Contact:
Oh. Hmm, that wouldn't make them be able to use things that require [EVIL] special, right? If not, then I'll probably do that or change it to something else completely.Zefz wrote:There is no script function to change or set special ID. You could simply use skill id instead. [EVIL] skill for example.
GiveSkillToTarget
Why isn't there that thing, btw? Is it one of those things that are impossible to code?
EDIT:
Another question. Because I'm retarded.
What would a simple message only script look like? You know, like, if something's bumped, it sends message 0, bumped again, message 1 and so on.
Once upon a time, when unicorns roamed the earth...
- Zefz
- Squirrel Knight (Administrator)
- Posts: 3820
- Joined: Wed Jul 23, 2008 1:27 am
- Location: Norway
- Contact:
It's pretty easy to code a SetTargetSpecialID function, but it's never been needed so it hasn't been done.
What would a simple message only script look like? You know, like, if something's bumped, it sends message 0, bumped again, message 1 and so on.
Code: Select all
IfBumped
//Send the message
tmpargument = selfcontent
SendMessageNear
//Ready next message
tmpargument = selfcontent + 1
SetContent
//Loop back to the first one
tmpx = selfcontent
tmpy = 6 //up to message 6
IfXIsEqualToY
tmpargument = 0
SetContent
- woodmouse
- Monolich (Senior Member)
- Posts: 4586
- Joined: Wed Jul 23, 2008 3:53 pm
- Location: Finland
- Contact:
Thanks.Zefz wrote:Code: Select all
IfBumped //Send the message tmpargument = selfcontent SendMessageNear //Ready next message tmpargument = selfcontent + 1 SetContent //Loop back to the first one tmpx = selfcontent tmpy = 6 //up to message 6 IfXIsEqualToY tmpargument = 0 SetContent
Once upon a time, when unicorns roamed the earth...
- woodmouse
- Monolich (Senior Member)
- Posts: 4586
- Joined: Wed Jul 23, 2008 3:53 pm
- Location: Finland
- Contact:
Okay, I'll do that.Zefz wrote:Put the NPC on a specific team... like Null team. Then make him join Good team when the player comes nearby?
Well, I guess I'll just have to put things closer to each other then.Zefz wrote:I don't think EgoMap supports resizing the map.
Once upon a time, when unicorns roamed the earth...
- woodmouse
- Monolich (Senior Member)
- Posts: 4586
- Joined: Wed Jul 23, 2008 3:53 pm
- Location: Finland
- Contact:
I seriously don't understand the random sounds. I mean these things:
Because they're not the soundX.wav numbers... It's kinda weird...
Code: Select all
tmpargument = rand & 1 + 10
PlayFullSound
tmpargument = rand & 7 + 9
PlayFullSound
tmpargument = rand % 6 + 15
PlayFullSound
Once upon a time, when unicorns roamed the earth...