Script related questions
Moderator: Developers
Script related questions
Script related questions.
I've created this topic in order to keep the Egoscript Functions thread from getting flooded with posts requiring help (Which, ironically, I started).
This topic is for help with Egoscript functions and general assistance with the more program related parts of developing Egoboo.
Small and simple questions would go here, if you have big scale scripting projects or something that requires a lot of attention, you can make your own thread, otherwise, stick to this one.
I've created this topic in order to keep the Egoscript Functions thread from getting flooded with posts requiring help (Which, ironically, I started).
This topic is for help with Egoscript functions and general assistance with the more program related parts of developing Egoboo.
Small and simple questions would go here, if you have big scale scripting projects or something that requires a lot of attention, you can make your own thread, otherwise, stick to this one.
I need some help with this:
This is a script for a medkit I'm making, I need help with two things:
1. How accurate are the heal target formulas? does the rand & 767 generate a number between 1 to 767 or something else?
2. I want to make the character sit down for the duration of the healing, which should be about 200 ticks. I can't seem to find a way to do it, I tried using SetTime and IfTimeOut functions, but it seems to ignore them.
Code: Select all
IfUsed
tmpargument = 220
SetReloadTime
MakeSimilarNamesKnown
IfTargetIsHurt
tmpargument = ACTIONML //sit animation?
TargetDoAction
KeepAction
tmpargument = 3
PlaySound
tmpargument = [WMAG]
IfTargetHasSkillID
tmpargument = targetwis * 64 + rand & 767 //Amount of life healed
HealTarget
Else
tmpargument = targetwis * 32 + rand & 767 //Amount of life healed
HealTarget
CostAmmo
UnkeepAction
tmpdistance = SPAWNORIGIN
tmpargument = 1
SpawnAttachedHolderParticle
Else
tmpargument = 6
SendMessageNear
This is a script for a medkit I'm making, I need help with two things:
1. How accurate are the heal target formulas? does the rand & 767 generate a number between 1 to 767 or something else?
2. I want to make the character sit down for the duration of the healing, which should be about 200 ticks. I can't seem to find a way to do it, I tried using SetTime and IfTimeOut functions, but it seems to ignore them.
- penguinflyer5234
- Sheep (Developer)
- Posts: 3025
- Joined: Wed Jul 23, 2008 1:39 am
- Location: Best Southwest
- penguinflyer5234
- Sheep (Developer)
- Posts: 3025
- Joined: Wed Jul 23, 2008 1:39 am
- Location: Best Southwest
- Zefz
- Squirrel Knight (Administrator)
- Posts: 3820
- Joined: Wed Jul 23, 2008 1:27 am
- Location: Norway
- Contact:
Code: Select all
SetTargetToRider
tmpargument = 100
SetFlyHeight
Else
tmpargument = 0
SetFlyHeight
- Zefz
- Squirrel Knight (Administrator)
- Posts: 3820
- Joined: Wed Jul 23, 2008 1:27 am
- Location: Norway
- Contact:
Hmm, depending if the OHKO blow was dealt by said weapon.
My first thought is this:
Think that should work.
My first thought is this:
Code: Select all
IfHolderScoredAHit //This function also sets the target to who the holder hit last
IfTargetIsAlive
DoNothing //He is still alive
Else
DoStuff //He is dead
Think that should work.
Zefz wrote:Hmm, depending if the OHKO blow was dealt by said weapon.
My first thought is this:Code: Select all
IfHolderScoredAHit //This function also sets the target to who the holder hit last
IfTargetIsAlive
DoNothing //He is still alive
Else
DoStuff //He is dead
Think that should work.
That code would be executed by any hit that killed the target though, not just by OHKOs...
- PurpleSquerkle
- Massive Gelfeet (Developer)
- Posts: 3176
- Joined: Wed Jul 23, 2008 4:54 am
- Location: Oakland, CA
- Contact:
I have an embarrassingly simple question regarding particles.
How do you make them stick to things (like flaming bodies etc.)?
I want to script a weapon (the Soul Carver, actually; I've been doing some improvements to it) so that will spawn flame-ish stuff on enemies under certain conditions....
How do I get it to spawn the particles on the enemy? Just set them as the target before I set it up for spawning, or what?
And how do I make it stick to their bodies like flames?
Does that just... happen? Or is there some mysterious force that governs stickiness and I am yet to discover what it is?
How do you make them stick to things (like flaming bodies etc.)?
I want to script a weapon (the Soul Carver, actually; I've been doing some improvements to it) so that will spawn flame-ish stuff on enemies under certain conditions....
How do I get it to spawn the particles on the enemy? Just set them as the target before I set it up for spawning, or what?
And how do I make it stick to their bodies like flames?
Does that just... happen? Or is there some mysterious force that governs stickiness and I am yet to discover what it is?