I'm a retard (so I ask help with stuff here)

Help regarding development/scripting, troubleshooting or just general gameplay -- anything that hasn't already been answered in the Wiki or pinned FAQs.

Moderator: Developers

Post Reply
User avatar
woodmouse
Monolich (Senior Member)
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)

Post by woodmouse »

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... :?
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...
User avatar
Maxaxle
Darkshine Knight (Extremist fanatic)
Darkshine Knight (Extremist fanatic)
Posts: 4035
Joined: Fri Jul 25, 2008 8:16 pm
Location: San Diego, CA
Contact:

Post by Maxaxle »

I think the numbers could be map coordinates, thought up by someone editing the map.
"Failing to plan is planning to fail."
Bug me if you want to play a game.
User avatar
Zefz
Squirrel Knight (Administrator)
Squirrel Knight (Administrator)
Posts: 3820
Joined: Wed Jul 23, 2008 1:27 am
Location: Norway
Contact:

Post by Zefz »

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:

Code: Select all

  tmpx = 28*128
  tmpy = 32*128
  AddWaypoint
Character will move to X: 28 and Y: 32.


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
This will teleport the character to a random nearby tile up to 5 tiles away.
User avatar
Maxaxle
Darkshine Knight (Extremist fanatic)
Darkshine Knight (Extremist fanatic)
Posts: 4035
Joined: Fri Jul 25, 2008 8:16 pm
Location: San Diego, CA
Contact:

Post by Maxaxle »

I KNEW IT!

But yeah, woodmouse, I don't think you'll have much trouble now.
"Failing to plan is planning to fail."
Bug me if you want to play a game.
User avatar
woodmouse
Monolich (Senior Member)
Monolich (Senior Member)
Posts: 4586
Joined: Wed Jul 23, 2008 3:53 pm
Location: Finland
Contact:

Post by woodmouse »

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:

Code: Select all

tmpargument = [EVIL]
GiveTargetSpecialIDSZ
So I'm kind of confused.
Once upon a time, when unicorns roamed the earth...
User avatar
Zefz
Squirrel Knight (Administrator)
Squirrel Knight (Administrator)
Posts: 3820
Joined: Wed Jul 23, 2008 1:27 am
Location: Norway
Contact:

Post by Zefz »

There is no script function to change or set special ID. You could simply use skill id instead. [EVIL] skill for example.

GiveSkillToTarget
User avatar
woodmouse
Monolich (Senior Member)
Monolich (Senior Member)
Posts: 4586
Joined: Wed Jul 23, 2008 3:53 pm
Location: Finland
Contact:

Post by woodmouse »

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
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.

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...
User avatar
Zefz
Squirrel Knight (Administrator)
Squirrel Knight (Administrator)
Posts: 3820
Joined: Wed Jul 23, 2008 1:27 am
Location: Norway
Contact:

Post by Zefz »

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
User avatar
woodmouse
Monolich (Senior Member)
Monolich (Senior Member)
Posts: 4586
Joined: Wed Jul 23, 2008 3:53 pm
Location: Finland
Contact:

Post by woodmouse »

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
Thanks. :)
Once upon a time, when unicorns roamed the earth...
User avatar
woodmouse
Monolich (Senior Member)
Monolich (Senior Member)
Posts: 4586
Joined: Wed Jul 23, 2008 3:53 pm
Location: Finland
Contact:

Post by woodmouse »

How can I make all enemies ignore an npc that needs to stay alive?

EDIT: Is resizing a map possible?
Once upon a time, when unicorns roamed the earth...
User avatar
Zefz
Squirrel Knight (Administrator)
Squirrel Knight (Administrator)
Posts: 3820
Joined: Wed Jul 23, 2008 1:27 am
Location: Norway
Contact:

Post by Zefz »

Put the NPC on a specific team... like Null team. Then make him join Good team when the player comes nearby?

I don't think EgoMap supports resizing the map.
User avatar
woodmouse
Monolich (Senior Member)
Monolich (Senior Member)
Posts: 4586
Joined: Wed Jul 23, 2008 3:53 pm
Location: Finland
Contact:

Post by woodmouse »

Zefz wrote:Put the NPC on a specific team... like Null team. Then make him join Good team when the player comes nearby?
Okay, I'll do that.
Zefz wrote:I don't think EgoMap supports resizing the map.
Well, I guess I'll just have to put things closer to each other then.
Once upon a time, when unicorns roamed the earth...
User avatar
octagon
Darkshine Knight (Extremist fanatic)
Darkshine Knight (Extremist fanatic)
Posts: 2589
Joined: Sat Feb 20, 2010 1:07 pm

Post by octagon »

Or you could lock him up like it's done with Lord Hagen.
User avatar
woodmouse
Monolich (Senior Member)
Monolich (Senior Member)
Posts: 4586
Joined: Wed Jul 23, 2008 3:53 pm
Location: Finland
Contact:

Post by woodmouse »

octagon wrote:Or you could lock him up like it's done with Lord Hagen.
LOL, a storyteller locked in a cage at a pond.
Once upon a time, when unicorns roamed the earth...
User avatar
woodmouse
Monolich (Senior Member)
Monolich (Senior Member)
Posts: 4586
Joined: Wed Jul 23, 2008 3:53 pm
Location: Finland
Contact:

Post by woodmouse »

I seriously don't understand the random sounds. I mean these things:

Code: Select all

      tmpargument = rand & 1 + 10
      PlayFullSound

      tmpargument = rand & 7 + 9
      PlayFullSound


    tmpargument = rand % 6 + 15
    PlayFullSound
Because they're not the soundX.wav numbers... It's kinda weird...
Once upon a time, when unicorns roamed the earth...
Post Reply