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

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

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

Post by woodmouse »

For some reason enemies attack but they don't damage the player...

Here's the script of the door that spawns them (if player doesn't have quest)

Code: Select all

//Open if key was used
IfTimeOut
  tmpargument = rand & 15 + 10
  SetTime
  tmpargument = passage
  SetTargetToWhoeverIsInPassage
  tmpargument = [BEMO]
  IfTargetHasQuest
    tmpargument = passage
    OpenPassage			//Yep
    tmpargument = 0
    SendMessageNear
  Else
    tmpargument = 3
    SendMessageNear
    tmpx = 1792
    tmpy = 384
    tmpdistance = selfz
    tmpargument = 44
    SpawnExactCharacterXYZ

    tmpx = 896
    tmpy = 384
    tmpdistance = selfz
    tmpargument = 44
    SpawnExactCharacterXYZ

    tmpx = 1280
    tmpy = 128
    tmpdistance = selfz
    tmpargument = 44
    SpawnExactCharacterXYZ

    tmpx = 512
    tmpy = 1152
    tmpdistance = selfz
    tmpargument = 44
    SpawnExactCharacterXYZ

    tmpargument = 100
    SetTime
    
and the enemies are Saboteurs using the default script they have with only this added:

Code: Select all

IfSpawned
  tmpargument = TEAME
  JoinTeam
I'm kinda 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:

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

Post by Zefz »

Could be a bug or a error in your damage particle?
User avatar
woodmouse
Monolich (Senior Member)
Monolich (Senior Member)
Posts: 4586
Joined: Wed Jul 23, 2008 3:53 pm
Location: Finland
Contact:

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

Post by woodmouse »

Zefz wrote:Could be a bug or a error in your damage particle?
The only difference is the script, so no. :(
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:

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

Post by woodmouse »

...and I might be giving up even trying to make anything. I mean, I used only the normal things in global objects folder, everything normally, etc... BUT STILL I GET SOME FREAKY ERRORS!!! I mean... how the heck can cobol.obj (for example) have a script error? :shock: Why do I get "invalid spawn instance error" or something, of every possible object!? I mean... just... impossible errors with everything... in a module that only has normal things. With the custom objects, it doesn't work at all and crashes. I kind of understand that, because I tend to do stuff that have serious problems... but still. How can the DEFAULT OBJECTS HAVE SCRIPT ERRORS!?!?!? When they work normally everwhere else. :o

...and another freaky error: without any objects, the whole module loads but it's just... blank. It looks fine in Egomap, it loads correctly... but it's all one huge plane surface. :shock:

And some things work in 2.8.1, but not in 2.8.2 beta... so either there's something seriously wrong with the compilablity (or however that's written) with EgoMap and 2.8.2, or something causes things to mess up weirdly, causing impossible bugs and errors.

-----

Then the normal "I'm a retard and need help" thing. :P I'm doing a boss character who's annoyingness incarnate:

-powerful armor
-uses protection spell
-uses life drain
-has animated shield and sword defending him

So the problem is... how can I get him to stay back? You know, so he'd work together with the shield and sword. Because you know, there isn't really much point in him running in front of them and just bumping the player... :P

PS: ...yeah, I know I said that there wouldn't be bugs in the modules I'm making, but it seriously just seems Egoboo hates everything I make, because like I said, even with no scripting, etc, everything is f***ed up. :shock:
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:

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

Post by Zefz »

Code: Select all

SetTargetToWatchTarget
tmpx = targetx
tmpy = targety
tmpdistance = -200
ClearWaypoints
AddWaypoint
This will make the AI look at the player but keep exactly 200 units of distance.
User avatar
woodmouse
Monolich (Senior Member)
Monolich (Senior Member)
Posts: 4586
Joined: Wed Jul 23, 2008 3:53 pm
Location: Finland
Contact:

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

Post by woodmouse »

Hmm, I keep getting script errors from that. :o
Here's that part from log.txt:

Code: Select all

SCRIPT ERROR: "mp_modules/testingstuf.mod/objects/argalxas.obj/script.txt"(112) - unknown opcode "SetTargetToNearestPlayer"
WARN: Invalid operand "mp_modules/testingstuf.mod/objects/argalxas.obj/script.txt"(112) - "SetTargetToNearestPlayer"
SCRIPT ERROR: "mp_modules/testingstuf.mod/objects/argalxas.obj/script.txt"(114) - unknown opcode "SetTargetToWatchTarget"
WARN: Invalid operand "mp_modules/testingstuf.mod/objects/argalxas.obj/script.txt"(114) - "SetTargetToWatchTarget"
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:

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

Post by Zefz »

SetTargetToNearestPlayer

not a script function. See aidocs.txt

SetTargetToWatchTarget is supposed to be SetTurnModeToWatchTarget (I think... again check aidocs.txt)
User avatar
woodmouse
Monolich (Senior Member)
Monolich (Senior Member)
Posts: 4586
Joined: Wed Jul 23, 2008 3:53 pm
Location: Finland
Contact:

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

Post by woodmouse »

Ooookay. Now I got the town fixed almost completely... but it's seriously empty, so... I dunno, maybe it's not finished but you know. I'll first test everything now again and then upload to mediafire and post it... of course it has sound errors (like guards talking about kabob when bumped... you know, I'm a bit lazy with stuff like that. :lol: ) so it might be retarded. :P
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:

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

Post by woodmouse »

So I've been doing a script for the epic old guy, and I got a problem; I don't know why all this happens at once:

Code: Select all

IfBumped
  tmpargument = 0
  IfContentIs
    SetTargetToWhoeverBumped
    IfTargetIsAPlayer
      tmpargument = [LGND]
      IfTargetHasItemID
        tmpargument = 7
        SendMessageNear
        tmpargument = selfcontent + 1
        SetContent
        tmpargument = 250
        SetTime

  tmpargument = 1
  IfContentIs
    tmpargument = 8
    SendMessageNear
    tmpargument = selfcontent + 1
    SetContent
    tmpargument = 250
    SetTime

  tmpargument = 2
  IfContentIs
    tmpargument = 9
    SendMessageNear
    SetTargetToWhoeverBumped
    IfTargetIsAPlayer
      tmpargument = [LGND]
      IfTargetHasItemID
        CostTargetItemID
        tmpargument = selfcontent + 1
        SetContent
        tmpargument = 250
        SetTime
      Else
        DoNothing
I guess it could be a problem with the SetTime, or it ignores the content things... I'm not really sure, so help would be nice?
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:

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

Post by Zefz »

Because Egoboo reads scripts from top to bottom, line by line. Everything happens inside the same IfBumped block.

Take this for example:

Code: Select all

IfBumped
  IfStateIs2                     //Is state = 2? No!
    tmpargument = 3         //dont do this
    SetState                    //dont do this

  IfStateIs0                   //Is State = 0 ? Yes!
    tmpargument = 1
    SetState                  //State is now 1

  IfStateIs1                  //Is state = 1? Yes!
    tmpargument = 2
    SetState                 //State is now 2
Not that everything that happens inside the IfBumped block happens in order. Both IfStateIs0 and IfStateIs1 will trigger. One solution is to put everything in reverse order (like IfStateIs2 on the top and IfStateIs0 last in the IfBumped block).
User avatar
woodmouse
Monolich (Senior Member)
Monolich (Senior Member)
Posts: 4586
Joined: Wed Jul 23, 2008 3:53 pm
Location: Finland
Contact:

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

Post by woodmouse »

Zefz wrote:Not that everything that happens inside the IfBumped block happens in order. Both IfStateIs0 and IfStateIs1 will trigger. One solution is to put everything in reverse order (like IfStateIs2 on the top and IfStateIs0 last in the IfBumped block).
Ohhh. Thanks. Now it works, yay!

EDIT: and now it doesn't work again... the Elf-stuff I mean, the weapon thing works, but... :shock:
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:

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

Post by woodmouse »

I got it to work, but now it doesn't work at all, again, and I didn't even change anything! Image

...so if anyone has any clue of what the problem is: http://www.mediafire.com/?5cqikoiw7sp79nt
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:

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

Post by woodmouse »

Is it possible to do a "different hands do different things" thing for a player character? I mean, so that when unarmed, the left hand would do one thing (restore mana and decrease health) and the right hand would do another (restore health and decrease mana). Because I'm not sure how to do that... and I don't feel like messing around for hours just to find out it wouldn't work. :P

...this would be what the angel character class could do, if it's possible to make, but well. If it's impossible, then I dunno. Maybe randomly one of those things... but that'd be annoying. Imagine a situation where you'd be like "OH MY GOD HEAL!!! FFFUUUUUUUUUUUUUU----" and then you die, because of that. :rofl:
Once upon a time, when unicorns roamed the earth...
User avatar
Shade
Potion Mimic (Senior Member)
Potion Mimic (Senior Member)
Posts: 7349
Joined: Thu Jul 24, 2008 12:25 pm
Location: Gensokyo

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

Post by Shade »

As far as I'm aware, both hands use "Unarmed" as an attack type and the same particle file. Unless there's a way to figure out which hand exactly the player used (I don't think the script allows that, but I haven't been able to play in like forever, so I'm not sure anymore), I don't think it's possible to give both hands different effects.
User avatar
woodmouse
Monolich (Senior Member)
Monolich (Senior Member)
Posts: 4586
Joined: Wed Jul 23, 2008 3:53 pm
Location: Finland
Contact:

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

Post by woodmouse »

Yeah, but even the healing is in the script.txt, done with IfUsed, so that's why I thought it'd be possible, since as far as I know, it's possible to script the button that's used for whatever, and then have two of those, for each hand. Maybe I remember wrong, because I can't remember anything that has that kinda things... or even if it would work, necessarily wouldn't mean it'd work on a player character... :?
Once upon a time, when unicorns roamed the earth...
Post Reply