Egoboo Forum

The Legend of Egoboo Sporks of Yore
What's wrong!?
Goto page Previous  1, 2
 
Post new topic   Reply to topic    Egoboo Forum Forum Index -> -> Help
View previous topic :: View next topic  
Author Message
penguinflyer5234
Penguin King


Joined: 01 Feb 2008
Age: 15
Posts: 1682
Location: Somewhere

PostPosted: Wed Apr 30, 2008 10:04 pm    Post subject: If a post contains some illegal issues you may abuse on it - just click Abuse and fill the form Reply with quote

I found in the EgoScript Functions thread:
SetTargetToNearestAlly: SetTargetToNearestFriend
IfTargetIsDead:
Code:

IfUsed
  SetTargetToNearestFriend
  tmpx = targetlife
  tmpy = 1 // Minimum life
    IfXIsLessThanY
      RespawnTarget
        IfTargetIsOnSameTeam
          HealTarget

I don't know if it works.
_________________
Donna Noble has left the library. Donna Noble has been saved.

Back to top
View user's profile Send private message
woodmouse
Skinner
Skinner


Joined: 19 Apr 2008
Age: 14
Posts: 3070
Location: Finland

PostPosted: Wed Apr 30, 2008 10:11 pm    Post subject: If a post contains some illegal issues you may abuse on it - just click Abuse and fill the form Reply with quote

Still script error... It does not make sense...

import/temp0002.obj/script.txt - This undefined
import/temp0002.obj/script.txt - manages undefined
import/temp0002.obj/script.txt - attack undefined
import/temp0002.obj/script.txt - speed undefined
import/temp0002.obj/script.txt - (Adjusted undefined
import/temp0002.obj/script.txt - by undefined
import/temp0002.obj/script.txt - strenght undefined
import/temp0002.obj/script.txt - and undefined
import/temp0002.obj/script.txt - dexterity) undefined
_________________
Back to top
View user's profile Send private message Send e-mail Visit poster's website
penguinflyer5234
Penguin King


Joined: 01 Feb 2008
Age: 15
Posts: 1682
Location: Somewhere

PostPosted: Wed Apr 30, 2008 10:12 pm    Post subject: If a post contains some illegal issues you may abuse on it - just click Abuse and fill the form Reply with quote

Is the first line a comment?
_________________
Donna Noble has left the library. Donna Noble has been saved.

Back to top
View user's profile Send private message
woodmouse
Skinner
Skinner


Joined: 19 Apr 2008
Age: 14
Posts: 3070
Location: Finland

PostPosted: Wed Apr 30, 2008 10:13 pm    Post subject: If a post contains some illegal issues you may abuse on it - just click Abuse and fill the form Reply with quote

Question And now it won't kill enemies if there are no friends near...
_________________
Back to top
View user's profile Send private message Send e-mail Visit poster's website
bgbirdsey
Developer
Developer


Joined: 25 Sep 2007
Posts: 873
Location: Minnesota

PostPosted: Wed Apr 30, 2008 10:51 pm    Post subject: If a post contains some illegal issues you may abuse on it - just click Abuse and fill the form Reply with quote

Try this

Code:

IfUsed
  SetTargetToNearestLifeform
  IfTargetIsOnHatedTeam
    KillTarget
  Else
    tmpx = targetlife
    tmpy = 1 // Minimum life
    IfXIsLessThanY
      RespawnTarget
    HealTarget
Back to top
View user's profile Send private message
woodmouse
Skinner
Skinner


Joined: 19 Apr 2008
Age: 14
Posts: 3070
Location: Finland

PostPosted: Thu May 01, 2008 4:32 am    Post subject: If a post contains some illegal issues you may abuse on it - just click Abuse and fill the form Reply with quote

Now it kills even the friends... Crying or Very sad

The error...

This file documents typos found in the AI scripts...
import/temp0002.obj/script.txt - This undefined
import/temp0002.obj/script.txt - manages undefined
import/temp0002.obj/script.txt - attack undefined
import/temp0002.obj/script.txt - speed undefined
import/temp0002.obj/script.txt - (Adjusted undefined
import/temp0002.obj/script.txt - by undefined
import/temp0002.obj/script.txt - strenght undefined
import/temp0002.obj/script.txt - and undefined
import/temp0002.obj/script.txt - dexterity) undefined
_________________
Back to top
View user's profile Send private message Send e-mail Visit poster's website
bgbirdsey
Developer
Developer


Joined: 25 Sep 2007
Posts: 873
Location: Minnesota

PostPosted: Thu May 01, 2008 5:07 am    Post subject: If a post contains some illegal issues you may abuse on it - just click Abuse and fill the form Reply with quote

You must have missed an opening '/' on a line that reads

    "This manages attack speed (Adjusted by strenght and dexterity)"


If you typed my mod in with the correct number of spaces (which is very important), anyone on a different team from you will be killed. You control the teams in the *.mod/basicdat/spawn.txt file.

Unless you have set the team of the scythe in the script to be the same as the person holding it, it will be on whatever team you made it spawn under...


Also, I made a minor error in the script since SetTargetToNearestLifeform only finds living creatures!




Code:

IfUsed
  tmpargument = [NONE]
  tmpdistance   = BLAHDEAD + BLAHFRIENDS + BLAHENEMIES
  SetTargetToNearestBlahID
  IfTargetIsOnHatedTeam
    KillTarget
  Else
    IfTargetIsAlive
      HealTarget
    Else
      RespawnTarget
      HealTarget
Back to top
View user's profile Send private message
woodmouse
Skinner
Skinner


Joined: 19 Apr 2008
Age: 14
Posts: 3070
Location: Finland

PostPosted: Thu May 01, 2008 5:41 am    Post subject: If a post contains some illegal issues you may abuse on it - just click Abuse and fill the form Reply with quote

Now there is no script error but enemies won't die if I just attack with it... They should just die, even if it won't hit... Now I have to slash them, and that weapon is not supposed to be like that...
_________________
Back to top
View user's profile Send private message Send e-mail Visit poster's website
bgbirdsey
Developer
Developer


Joined: 25 Sep 2007
Posts: 873
Location: Minnesota

PostPosted: Thu May 01, 2008 6:02 am    Post subject: If a post contains some illegal issues you may abuse on it - just click Abuse and fill the form Reply with quote

1) The above code fragment assumes that the SetTargetToNearestBlahID works "as advertised", which it might not be working at all, so the scythe will resurrect everyone??? Assume that this function will be fixed in the future, though!

2) There is some very important information we may need to know before anyone can help you further:

What team are you spawning the scythe as? What team are you? What team is this supposed enemy? What does the alliance.txt file say?

Please don't expect me to go look. It is important for you to learn how this all works... "teach a man to fish" and all of that.

3) Regardless of all of this info, you may HAVE to set the team of the scythe to match the team of the person holding it for this to work the way you want it to.
Back to top
View user's profile Send private message
woodmouse
Skinner
Skinner


Joined: 19 Apr 2008
Age: 14
Posts: 3070
Location: Finland

PostPosted: Thu May 01, 2008 6:09 am    Post subject: If a post contains some illegal issues you may abuse on it - just click Abuse and fill the form Reply with quote

IT WORKS NOW!!! I just have to slash and slash like with normal scythe, but it now makes dead friends respawn! And THAT'S the best thing! Thank you, Bgbirdsey! Thank you so much! Yippeeee! Whee
_________________
Back to top
View user's profile Send private message Send e-mail Visit poster's website
bgbirdsey
Developer
Developer


Joined: 25 Sep 2007
Posts: 873
Location: Minnesota

PostPosted: Thu May 01, 2008 6:16 am    Post subject: If a post contains some illegal issues you may abuse on it - just click Abuse and fill the form Reply with quote

You should put something in there about the object requiring all of its own mana to work (just set the mana and manaregen lines in data.txt), so that the rep rate is not way too high.

Also, you could so something with a random number so that it only has a small chance of resurrecting or killing per use? This the chance could increase with the LEVEL OF THE SCYTHE! Twisted Evil
Back to top
View user's profile Send private message
woodmouse
Skinner
Skinner


Joined: 19 Apr 2008
Age: 14
Posts: 3070
Location: Finland

PostPosted: Thu May 01, 2008 6:45 am    Post subject: If a post contains some illegal issues you may abuse on it - just click Abuse and fill the form Reply with quote

NOW IT WORKS PERFECTLY!!!

I edited the script a little and... Here it is:

//This manages attack speed (Adjusted by strenght and dexterity)
IfUsed
SetTargetToWhoeverIsHolding
tmpargument = targetdex > 9 //Every 2 points of dex increases speed by 1
tmpargument = 60 - tmpargument
SetReloadTime

// ZZ> This function makes an item fall to the floor when spawned
IfSpawned //
tmpargument = ACTIONJB //
DoAction //
KeepAction //
MakeCrushValid
IfCrushed
tmpx = selfx
tmpy = selfy
tmpdistance = selfz
tmpargument = 1
SpawnExactParticle
SpawnExactParticle
SpawnExactParticle
SpawnExactParticle
GoPoof
tmpargument = 1
SendMessageNear
IfDropped // Make it lie on floor
KeepAction //
IfHitGround // Make a sound
tmpargument = 1 //
tmpdistance = rand & 2047 + 10000 //
PlaySound //
IfTakenOut // Make a sound
tmpargument = 2 //
tmpdistance = rand & 2047 + 10000 //
PlaySound //
SetTargetToWhoeverIsHolding //
IfTargetIsAPlayer //
tmpargument = 2 //
SendMessageNear //
IfGrabbed // Tell them what they've won...
SetTargetToWhoeverIsHolding //
IfTargetIsAPlayer //
tmpargument = 0 //
SendMessageNear //

IfUsed
tmpargument = [NONE]
tmpdistance = BLAHDEAD + BLAHFRIENDS + BLAHENEMIES
SetTargetToNearestBlahID
IfTargetIsOnHatedTeam
KillTarget
Else
SetTargetToNearestFriend
IfTargetIsOnSameTeam
IfTargetIsAlive
HealTarget
Else
IfTargetIsOnSameTeam
RespawnTarget
HealTarget
IfUsed
SetTargetToSelf
SendMessageNear // Make a sound
tmpargument = 3 //
End // All done
_________________
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Zefz
Lead Designer
Lead Designer


Joined: 16 Sep 2007
Posts: 2305
Location: Norway

PostPosted: Thu May 01, 2008 1:04 pm    Post subject: If a post contains some illegal issues you may abuse on it - just click Abuse and fill the form Reply with quote

I would use SetTargetToNearestEnemy

and IfTargetIsAlive + Else

I find it more optimized and cleaner.
_________________
http://egoboo.sourceforge.net

"The pen is mightier than the sword- IF it is sharpened, dipped in poison and thrown really really hard at your target. But seriously, you are better off with a sword."
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Egoboo Forum Forum Index -> -> Help All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


© 2007 Informe.com. Get Free Forum Hosting
Powered by phpBB © 2001, 2005 phpBB Group

RedSilver 1.01 Theme was programmed by DEVPPL HTML Forum
Images were made by DEVPPL Photoshop Forum