Announcement: Be excellent to each other.


Caravel Forum : Caravel Boards : General : Is it Possible?--A list of questions about what DROD script can do (And, more importantly, what it cannot)
New Topic New Poll Post Reply
Poster Message
Xindaris
Level: Smitemaster
Avatar
Rank Points: 1527
Registered: 06-13-2015
IP: Logged
icon Is it Possible?--A list of questions about what DROD script can do (+1)  
This is the only place I could figure out where this thread might go, even though I don't really see any threads like it around. If I have the wrong subforum, please let me know and maybe move the thread to the right place? Or I'll delete it and move it myself, if necessary.

I have some ideas in my head for some custom elements to script into DROD, but I'm not terribly familiar with the deeper aspects of the scripting, and it is honestly a bit obtuse to someone who's learned a tiny bit of Java and C++ and not much else. So I'm trying to figure out whether or not it's even possible to build the things I want to build, and also, if it requires some obscure aspect of the language that would be difficult to find on one's own, I'd like to be educated in the use of that aspect. So, here we go:

Is it possible to have an NPC generate another NPC and dictate what the newly-made NPC's script is? For example, would it be possible to, entirely in script, have an NPC place a "roach egg" (also an NPC), along with script on the egg itself that would make it "grow" and turn into a roach (via disappear+generate Roach at me, or such)?

Is it possible to tell an NPC to target a specific kind of monster (say, roaches only, not roach queens), nearest first (straight line of sight), and go attack it, similar to how fluff targets monsters, but only with a specific kind?

Is it possible to give an NPC a "chase Beethro" behavior that still respects invisibility?

Is it possible to make an NPC activate the threat clock while alive and make the threat clock disappear when it dies, but only if there aren't other things that make the threat clock appear around (like what happens with snakes, roach queens, etc.)?

Is it possible to make an NPC move along a straight line until it hits an obstacle, all in the same turn?

Is it possible, given the above, to check what obstacle the NPC hits, and whether or not it crosses a certain kind of tile on the way there (like say, shallow water or hot tile)?

Is it possible, using the "Wait for someone to push me" command, to then detect which direction (north/south/east/west/etc.) the push came from?

If it is possible, and not all that hard, I'd appreciate a hint on how to make it, so I can work out the rest on my own. If it's possible and requires some obscure trick to make it work, please enlighten me. If it's not possible, please let me know so I don't waste my time trying to do it.

____________________________
109th Skywatcher

Here are some links to Things!
Click here to view the secret text


[Last edited by Xindaris at 07-20-2015 04:27 PM]
07-20-2015 at 04:02 PM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
Nuntar
Level: Smitemaster
Avatar
Rank Points: 4576
Registered: 02-20-2007
IP: Logged
icon Re: Is it Possible?--A list of questions about what DROD script can do (+5)  
Xindaris wrote: Is it possible to have an NPC generate another NPC and dictate what the newly-made NPC's script is? For example, would it be possible to, entirely in script, have an NPC place a "roach egg" (also an NPC), along with script on the egg itself that would make it "grow" and turn into a roach (via disappear+generate Roach at me, or such)?
Yes. If you create a custom monster type, for instance Fake Roach Egg, it will appear as an option for the Generate Entity command. Doing this will run the custom monster's default script (you cannot generate an entity with an individual script). To edit a default script, click "Characters" in the script editor window, then "Edit Default Script".

Is it possible to tell an NPC to target a specific kind of monster (say, roaches only, not roach queens), nearest first (straight line of sight), and go attack it, similar to how fluff targets monsters, but only with a specific kind?
Technically possible but difficult. Check whether there's a roach in the room, and if there is, run a loop incrementing a variable, then use MyScriptX and MyScriptY to check for a roach within n tiles of the NPC.

I wouldn't attempt this until you're more familiar with using MyScript variables (see my answer to your fifth question, below).

Is it possible to give an NPC a "chase Beethro" behavior that still respects invisibility?
Yes. This script will do it:

Label loop
If...
Wait until var PlayerInvisible = 0
Move to player Single step
Else
Wait 0
If End
Go to loop


Note that "PlayerInvisible" is not a default variable: you have to create it, and have another script that toggles PlayerInvisible if the player steps on an invisibility potion (by testing for the player at the coordinates of all potions in the particular room).

Is it possible to make an NPC activate the threat clock while alive and make the threat clock disappear when it dies, but only if there aren't other things that make the threat clock appear around (like what happens with snakes, roach queens, etc.)?
Simple. Have an invisible character with this script:

Label loop
If...
Wait for entity type [name of NPC type] at (whole room)
Set var ThreatClock = 2
Else
Set var ThreatClock = 0
If End
Go to loop


Is it possible to make an NPC move along a straight line until it hits an obstacle, all in the same turn?
Yes. This requires the "MyScript" variables, which override parameters of script commands (unless their value is -9999, a special value that means "No override"). I'll give an example where the entity is moving south, but it can be changed for other directions.

Set _MyScriptX = _MyX, _MyScriptY = _MyY (so the NPC is looking at its own square), then run a loop incrementing _MyScriptY by 1 (moving the square it's looking at one tile south), then check for obstacles on that square. If there's an obstacle, subtract 1 from _MyScriptY, exit the loop, appear at (0,0) (the MyScript variables will override this and go to the square looked at), then set _MyScriptX and Y back to -9999. You must always set these variables back after using them, or they will interfere with other script commands!

Is it possible, given the above, to check what obstacle the NPC hits, and whether or not it crosses a certain kind of tile on the way there (like say, shallow water or hot tile)?
Yes, the "checking for obstacles" part of the above script would involve testing for every type of obstacle, and if you want to include shallow water and hot tiles, you can do that, or can make it behave differently on encountering those.

Is it possible, using the "Wait for someone to push me" command, to then detect which direction (north/south/east/west/etc.) the push came from?
If the entity is stationary, you could run a loop that sets custom variables CurrentX, CurrentY to _MyX, _MyY each turn, then if it's pushed, comparing these variables to _MyX and _MyY will tell you which direction it's been pushed in.

Hope that helps -- I can give you some more help for the more difficult scripts if you like, but a couple of them will be pretty long so I'd rather not write them for you :)

____________________________
50th Skywatcher
07-20-2015 at 06:03 PM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
blorx1
Level: Smitemaster
Rank Points: 920
Registered: 07-18-2009
IP: Logged
icon Re: Is it Possible?--A list of questions about what DROD script can do (+2)  
Here's some other useful reference material on this stuff to get you started:

Edit: Rereading the threads, it's less useful to someone new than I thought, mostly for implementation stuff of myscript if you already know it. Apparently DROD RPG has ingame help explaining myscript, but that's rather annoying to get to.

This is for DROD RPG but a lot of stuff carries over on use of MyScript.

And this contains the numbers you'd use for various checks and settings in MyScript if you're using TSS.

There are some more hints scattered in various architecture topics, but they can be hard to find.

Also, in reference to the invisibility respecting monster, Nuntar's script won't handle being far away from the monster correctly, that's a little more difficult, but can be done by comparing the player and monster coordinates.

____________________________
If you need to think outside of the box, then you didn't build a good enough box.

[Last edited by blorx1 at 07-20-2015 06:20 PM]
07-20-2015 at 06:14 PM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
Dischorran
Level: Smitemaster
Avatar
Rank Points: 3406
Registered: 09-10-2005
IP: Logged
icon Re: Is it Possible?--A list of questions about what DROD script can do (+1)  
Lavender Levels has instances of a few of these that can be adapted once you unlock editor access, if you get stumped. Might be easier to work them out on your own, of course
Xindaris wrote:
Is it possible to have an NPC generate another NPC and dictate what the newly-made NPC's script is? For example, would it be possible to, entirely in script, have an NPC place a "roach egg" (also an NPC), along with script on the egg itself that would make it "grow" and turn into a roach (via disappear+generate Roach at me, or such)?
For this issue in particular, generating an egg will automatically make it grow into a roach: see the Mysterious Potion script. More generally, the Conway script relies heavily on this.
Xindaris wrote:
Is it possible to make an NPC move along a straight line until it hits an obstacle, all in the same turn?

Is it possible, given the above, to check what obstacle the NPC hits, and whether or not it crosses a certain kind of tile on the way there (like say, shallow water or hot tile)?
The hookshot script works by doing this; while it doesn't track tiles along the way, it's easy enough to modify the checks it makes en route to change a variable when it detects that it's on the particular type of tile.

____________________________
Click here to view the secret text

07-20-2015 at 08:18 PM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores This architect's holds Quote Reply
Xindaris
Level: Smitemaster
Avatar
Rank Points: 1527
Registered: 06-13-2015
IP: Logged
icon Re: Is it Possible?--A list of questions about what DROD script can do (0)  
Thank you very much for this help, I'm actually chugging along on the "easier" of the elements I had in mind to inspire all these questions, and I need to be sure I understand how the _MyscriptX/Y works.

If I say "If... Wait for item Dirt Floor at" and pick an arbitrary single-tile location, but I've set _MyscriptX and _MyscriptY to some other numbers, is it going to check for the Dirt Floor at _MyscriptX _MyscriptY? Or is there some other way to have it select the location I want to look at for the item in question? And just so we're clear, if my understanding of this is correct, it would do the same thing with commands like Destroy Trapdoor at, right?

I'm not specifically trying to make a roach egg, by the way, that was just an example not directly indicative of what I'm really trying to do. I don't want to reveal so much about my plans that it's even possible for people to do it all for me.

____________________________
109th Skywatcher

Here are some links to Things!
Click here to view the secret text


[Last edited by Xindaris at 07-20-2015 08:38 PM]
07-20-2015 at 08:37 PM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
Dischorran
Level: Smitemaster
Avatar
Rank Points: 3406
Registered: 09-10-2005
IP: Logged
icon Re: Is it Possible?--A list of questions about what DROD script can do (+1)  
Yes, _MyScript variables always overwrite any other arguments. I generally set them to the desired value immediately before use, and reset them to -9999 immediately after; not doing this has been the cause of way too many hard-to-find scripting bugs.

____________________________
Click here to view the secret text

07-20-2015 at 08:48 PM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores This architect's holds Quote Reply
Xindaris
Level: Smitemaster
Avatar
Rank Points: 1527
Registered: 06-13-2015
IP: Logged
icon Re: Is it Possible?--A list of questions about what DROD script can do (0)  
Okay, I'm glad I understood that decently well. New questions:

-Due to the way a turn is actually handled, multiple instances of an entity using CurrentX and CurrentY in the way you described wouldn't conflict with each other even if they're being pushed in the same turn, right? Even if Beethro's pushing two of them, one with his sword and one with his body?

-I'm pretty sure it's possible to have an NPC push an object such as a mirror the same way an unarmed Beethro would, because the Lemmings do it in TSS; how is this usually done, and can it be done in the middle of an "instantaneous move" loop without introducing a bizarre one-turn wait between "landing" the move and pushing the object? Perhaps more importantly, is it possible to push an entity as if there were a stick pushing it from that direction, complete with stunning it for a turn?

____________________________
109th Skywatcher

Here are some links to Things!
Click here to view the secret text

07-20-2015 at 09:40 PM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
Dischorran
Level: Smitemaster
Avatar
Rank Points: 3406
Registered: 09-10-2005
IP: Logged
icon Re: Is it Possible?--A list of questions about what DROD script can do (+1)  
Xindaris wrote:
Okay, I'm glad I understood that decently well. New questions:

-Due to the way a turn is actually handled, multiple instances of an entity using CurrentX and CurrentY in the way you described wouldn't conflict with each other even if they're being pushed in the same turn, right? Even if Beethro's pushing two of them, one with his sword and one with his body?

-I'm pretty sure it's possible to have an NPC push an object such as a mirror the same way an unarmed Beethro would, because the Lemmings do it in TSS; how is this usually done, and can it be done in the middle of an "instantaneous move" loop without introducing a bizarre one-turn wait between "landing" the move and pushing the object? Perhaps more importantly, is it possible to push an entity as if there were a stick pushing it from that direction, complete with stunning it for a turn?
Um, probably not. You can make a variable local by preceding it with a period, just to be safe.

As far as I know, having the NPC push something with it requires a move command, which ends the script for the turn; actually moving without ending the turn requires a teleport command or directly changing location variables (as per Entropic Aumtlich). So no, as far as I know you can't push something multiple squares in a turn with scripting, although maybe that's changing with the next patch?

____________________________
Click here to view the secret text

07-20-2015 at 10:20 PM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores This architect's holds Quote Reply
Xindaris
Level: Smitemaster
Avatar
Rank Points: 1527
Registered: 06-13-2015
IP: Logged
icon Re: Is it Possible?--A list of questions about what DROD script can do (0)  
That's actually OK, I only want to move the mirror one step. But I'm not sure I understand how to command the NPC to "Just move North one step" for example. The "Move" command seems to cause it to take one step per turn off in some seemingly random direction.

Also, does telling an NPC to move north straight into a roach behave as if the roach had been hit northward with a stick? Or is there any way to create that behavior?

____________________________
109th Skywatcher

Here are some links to Things!
Click here to view the secret text

07-20-2015 at 11:08 PM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
Nuntar
Level: Smitemaster
Avatar
Rank Points: 4576
Registered: 02-20-2007
IP: Logged
icon Re: Is it Possible?--A list of questions about what DROD script can do (+1)  
Xindaris wrote: But I'm not sure I understand how to command the NPC to "Just move North one step" for example. The "Move" command seems to cause it to take one step per turn off in some seemingly random direction.
Move (0,-1) will move one step north. Negative numbers for west and north, positive for east and south. If you are getting "seemingly random" behaviour, that's probably because you haven't reset your MyScript variables.

Also, does telling an NPC to move north straight into a roach behave as if the roach had been hit northward with a stick? Or is there any way to create that behavior?
No, roaches and other default monsters are not pushable by body under any circumstances. The only way to do this would be to actually give your NPC a staff (Set var _MyWeapon = 3).

____________________________
50th Skywatcher
07-20-2015 at 11:28 PM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
Xindaris
Level: Smitemaster
Avatar
Rank Points: 1527
Registered: 06-13-2015
IP: Logged
icon Re: Is it Possible?--A list of questions about what DROD script can do (0)  
Well, I added resets to -9999 before the move command, and that fixed it to where it attempts to move and doesn't behave bizarrely, so that's good. But it still won't push anything, it won't move unless there isn't a mirror or powder keg north of it.

Also, in writing the obstacle detection loop I've found that..the wait for item at lists, even the MyscriptF list at the _Myscript and TSS page, doesn't include force arrows. Or am I missing something?

____________________________
109th Skywatcher

Here are some links to Things!
Click here to view the secret text

07-21-2015 at 03:07 AM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
Dischorran
Level: Smitemaster
Avatar
Rank Points: 3406
Registered: 09-10-2005
IP: Logged
icon Re: Is it Possible?--A list of questions about what DROD script can do (0)  
Being able to push is something that comes with some character types and not others, I think. Try setting the character type to one of the citizens and see if that helps?

____________________________
Click here to view the secret text

07-21-2015 at 03:12 AM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores This architect's holds Quote Reply
D.Craven_0ne
Level: Master Delver
Avatar
Rank Points: 201
Registered: 12-23-2012
IP: Logged
icon Re: Is it Possible?--A list of questions about what DROD script can do (+1)  
Well most of what I could say has been said, but...
Nuntar wrote:
Xindaris wrote: Is it possible to have an NPC generate another NPC and dictate what the newly-made NPC's script is? For example, would it be possible to, entirely in script, have an NPC place a "roach egg" (also an NPC), along with script on the egg itself that would make it "grow" and turn into a roach (via disappear+generate Roach at me, or such)?
Yes. If you create a custom monster type, for instance Fake Roach Egg, it will appear as an option for the Generate Entity command. Doing this will run the custom monster's default script (you cannot generate an entity with an individual script). To edit a default script, click "Characters" in the script editor window, then "Edit Default Script".

I actualy did something like this in my wip hold. (I swear I'll finish it someday! xD) Due to some stuff happening, an anyone edit version was posted in the topic. See if you had something like that in mind, you should be able to acces the scripting (Witch is probably a horrible abomination for anyone who knows how to optimize these things). The spawners are on the third level, if ya wana see them work.

Also yes, you have no scripting acces to arrows.:no

____________________________
..and remember kids, don't fear war! In nuclear winter, everyday's a christmas!
07-21-2015 at 07:34 AM
View Profile Send Private Message to User Show all user's posts Quote Reply
Xindaris
Level: Smitemaster
Avatar
Rank Points: 1527
Registered: 06-13-2015
IP: Logged
icon Re: Is it Possible?--A list of questions about what DROD script can do (0)  
Is "All I hear beyond the walls" the WIP hold you're talking about, or is it another one? I tried google searching to find that one.

Man, everything I want to do with one of these elements would be SO much easier if there were just two commands available:
-Push Me [Direction] [Staff/Caber], which makes the character executing the command behave as if pushed in the direction by either a staff or a caber;
-Push [Direction] [Staff/Caber], which pushes whatever is in that direction from the script-holder as if by a staff or caber;
Both of which happen "instantaneously" (i.e., do not include an effective "wait 0 turn" afterward the way move commands do)

This would deal with the problem of arrows, and (now that I think of it) Briars, and that of weapons not being checkable obstacles for the script either (again, unless I'm missing something), and I'd only have to deal with a few particular exceptional cases.

Decorative Issues:

I can't find a command for "Play standard DROD sound", or even "Play an imported sound". I might just be blind though. I want one object I'm making to produce a "move through tunnel" sound in certain cases. It might also be cool to make its movement produce its own unique sound.

Next, is there any way to make something appear on a pit tile and then immediately "fall down the pit", complete with the "thing falling down a pit" sound?

Finally, it's not exactly a directly scripting issue, but does anyone know what color DROD treats as "Transparent" when it imports character tile images? I"ve tried black, white, actual transparent, and the grayish color surrounding the cursor image in the install directory's data/Bitmaps location, and none of them work. I really want to use a custom graphic for this element but it should be possible to see buttons under it for goodness' sakes.

____________________________
109th Skywatcher

Here are some links to Things!
Click here to view the secret text


[Last edited by Xindaris at 07-21-2015 05:06 PM]
07-21-2015 at 04:58 PM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
hyperme
Level: Smitemaster
Avatar
Rank Points: 1055
Registered: 06-23-2006
IP: Logged
icon Re: Is it Possible?--A list of questions about what DROD script can do (+1)  
(192,192,192) is the transparency colour for custom NPC graphics.

____________________________
[Insert witty comment here]
Qzvlkx?
07-21-2015 at 05:15 PM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
D.Craven_0ne
Level: Master Delver
Avatar
Rank Points: 201
Registered: 12-23-2012
IP: Logged
icon Re: Is it Possible?--A list of questions about what DROD script can do (0)  
Xindaris wrote:
1) Is "All I hear beyond the walls" the WIP hold you're talking about, or is it another one? I tried google searching to find that one.

2) easier if there were just two commands available...

3) Sounds

1) Yeah thats the one. It's in architecture.

2) Well you can always make a feature request, but those take quite a while, IF peeps decide that it is a good idea that is.

3) I don't think it's possible to play ingame sounds, but imported ones can be done with "ambient sound" I think.



____________________________
..and remember kids, don't fear war! In nuclear winter, everyday's a christmas!
07-21-2015 at 05:55 PM
View Profile Send Private Message to User Show all user's posts Quote Reply
Xindaris
Level: Smitemaster
Avatar
Rank Points: 1527
Registered: 06-13-2015
IP: Logged
icon Re: Is it Possible?--A list of questions about what DROD script can do (+1)  
All excellent help, thank you so much! I just went ahead and made a custom sound for one of the things I wanted a sound for, and now that I know how it works I can probably figure out some good sounds for some of the other stuff too.

I figured out that what I was looking for with the pit was just the "Die Special" command. Derp.

I..might have discovered a bug. Imperative Pushable By Both evidently makes it so Beethro's weapon and body can push it (as expected), and Mimic, time clone, and other double WEAPONS can push the entity, but NOT their bodies?

____________________________
109th Skywatcher

Here are some links to Things!
Click here to view the secret text

07-21-2015 at 06:35 PM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
Jeff_Ray...
Level: Smitemaster
Avatar
Rank Points: 962
Registered: 05-16-2005
IP: Logged
icon Re: Is it Possible?--A list of questions about what DROD script can do (+1)  
You could technically play a sound effect with the Game Effect command, but that might not work because there will be an effect associated with the sound.

Also, if you found a bug, you should report it in the Bugs forum. :)

____________________________
I make Let's Plays too!
Click here to find out my LPs' progress, and find out what I plan to tackle next!

Currently playing:
Click here to view the secret text


My Holds:
-Completed:
Click here to view the secret text

-Work in Progress:
Click here to view the secret text


[Last edited by Jeff_Ray... at 07-22-2015 03:06 PM]
07-22-2015 at 03:05 PM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores This architect's holds Quote Reply
Xindaris
Level: Smitemaster
Avatar
Rank Points: 1527
Registered: 06-13-2015
IP: Logged
icon Re: Is it Possible?--A list of questions about what DROD script can do (0)  
Is there a way to have a (possibly vulnerable) character perform a set of commands "on death"? That is, in between being stabbed or shoved into a pit tile or whatever and actually deleting itself?

Thanks to all the help, I now have a hold with 4 related custom elements in the works, but there is one particular undesirable quirk they have that could be fixed by this kind of command.

____________________________
109th Skywatcher

Here are some links to Things!
Click here to view the secret text


[Last edited by Xindaris at 07-25-2015 08:42 PM]
07-25-2015 at 08:40 PM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
hyperme
Level: Smitemaster
Avatar
Rank Points: 1055
Registered: 06-23-2006
IP: Logged
icon Re: Is it Possible?--A list of questions about what DROD script can do (+1)  
Xindaris wrote:
Is there a way to have a (possibly vulnerable) character perform a set of commands "on death"? That is, in between being stabbed or shoved into a pit tile or whatever and actually deleting itself?

Nope. Things that kill a character end the script instantly. While certain death conditions can be checked for if the NPC is invulnerable, stuff like drowning can only be avoided by using a base NPC that avoids that type of death, which of course has it's own complications.

____________________________
[Insert witty comment here]
Qzvlkx?

[Last edited by hyperme at 07-25-2015 09:03 PM]
07-25-2015 at 09:03 PM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
Someone Else
Level: Smitemaster
Avatar
Rank Points: 1299
Registered: 06-14-2005
IP: Logged
icon Re: Is it Possible?--A list of questions about what DROD script can do (+1)  
One (possibly the best) way of dealing with this is to create a monitor character that figures out where it is at all times and does something if it's not where it should be. This fails if you have more than one character of the same entity type (for the Wait for entity type... command), but otherwise you should be good.
07-26-2015 at 01:43 AM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores This architect's holds Quote Reply
Xindaris
Level: Smitemaster
Avatar
Rank Points: 1527
Registered: 06-13-2015
IP: Logged
icon Re: Is it Possible?--A list of questions about what DROD script can do (0)  
I actually think I know how to fix the quirk already, it just means I can't use the convenience the Construct character type otherwise provides me so I have to go and directly script in those behaviors. It's gonna be an annoying bit of coding to have to go back and do on all of them. Oh well.

I can't use a monitor character that way because the elements I'm making are supposed to be able to appear en masse for puzzles. Using just one in a room is an interesting restriction but wouldn't allow them to live up to their full potential.

____________________________
109th Skywatcher

Here are some links to Things!
Click here to view the secret text


[Last edited by Xindaris at 07-26-2015 02:48 AM]
07-26-2015 at 02:46 AM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
Someone Else
Level: Smitemaster
Avatar
Rank Points: 1299
Registered: 06-14-2005
IP: Logged
icon Re: Is it Possible?--A list of questions about what DROD script can do (+1)  
Oh, one other idea: If a maximum of one could die per turn, you could check for the death of one of them. Additionally, if they can only die to Beethro's sword, you can find out where the one that died is.
07-26-2015 at 04:12 PM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores This architect's holds Quote Reply
Xindaris
Level: Smitemaster
Avatar
Rank Points: 1527
Registered: 06-13-2015
IP: Logged
icon Re: Is it Possible?--A list of questions about what DROD script can do (+1)  
Eeyurgh. I might as well explain the problem in slightly more detail because my workaround has an issue, and the workaround to that issue is, looks like, going to be another weird quirk.

Problem: I need a character that pushes down pressure plates but does not die to pits and water so I can make the element I'm working on do something before dying to pits in a specific exceptional case.
Solution: Set appearance back and forth between two identical-looking (and identically scripted) characters, one of which is "roach-based" and the other of which is "wraithwing-based", depending on whether or not it's sitting on top of a pressure plate (possibly kill it at pits after doing the thing it needs to by turning it into the weighted character as well? Just to be sure it "falls down" correctly and doesn't explode in blood splatters over a pit).
Issues with solution: Based on a little bit of testing, if my character goes onto a pressure-plate tile, THEN changes appearance to something weighted, the plate isn't activated?? It has to be pushed again onto another tile of the same big plate if anything. The exceptional case I'm worried about can't happen if it's sitting on top of a pressure plate before being pushed into a pit or water (Because it actually requires it to be sitting on top of a trapdoor!), though I initially thought that would be a problem for some reason.

EDIT: Nevermind, I fixed it. It just has to Dissapear-->change appearance-->Appear and it works perfectly! Woo!

____________________________
109th Skywatcher

Here are some links to Things!
Click here to view the secret text


[Last edited by Xindaris at 07-26-2015 07:21 PM]
07-26-2015 at 07:13 PM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
New Topic New Poll Post Reply
Caravel Forum : Caravel Boards : General : Is it Possible?--A list of questions about what DROD script can do (And, more importantly, what it cannot)
Surf To:


Forum Rules:
Can I post a new topic? No
Can I reply? No
Can I read? Yes
HTML Enabled? No
UBBC Enabled? Yes
Words Filter Enable? No

Contact Us | CaravelGames.com

Powered by: tForum tForumHacks Edition b0.98.8
Originally created by Toan Huynh (Copyright © 2000)
Enhanced by the tForumHacks team and the Caravel team.