Announcement: Why not try our official idea generator for inspiration when making puzzles?


Caravel Forum : DROD Boards : Architecture : Scripting problem...
New Topic New Poll Post Reply
Poster Message
Quewort
Level: Delver
Rank Points: 52
Registered: 01-08-2015
IP: Logged
icon Scripting problem... (+2)  
Well, I want stalwart to be disarmed in cutscene...

I tried to set var MySword to 6, it works, he was disarmed, but he still looked like he hold his sword... -_-

Is this possible to make him disarmed somehow? (I am not so good at scripting...)
01-15-2015 at 04:10 PM
View Profile Send Private Message to User Show all user's posts Quote Reply
Nuntar
Level: Smitemaster
Avatar
Rank Points: 5418
Registered: 02-20-2007
IP: Logged
icon Re: Scripting problem... (+3)  
I'm afraid it's not possible. I've asked for this as a feature request, so we may get it in a future version of DROD, but it can't be done in 5.0.

Oh hey, this is a hidden feature that no-one talks about. Set _MySword to -2.

____________________________
50th Skywatcher

[Last edited by Nuntar at 10-04-2015 05:08 PM]
01-15-2015 at 09:00 PM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
Chaco
Level: Smitemaster
Rank Points: 3772
Registered: 10-06-2005
IP: Logged
icon Re: Scripting problem... (+1)  
As a work-around, you could copy the Stalwart disarmed tiles off of the GeneralTiles spritesheet, then make a new custom character based off of a swordless role that uses those as custom tiles.

You'd have to get a permission number from mrimer (or Schik?) before you published your hold to the Holds board if you used that solution, but they're very generous with such things.

____________________________
Quick links to my stuff (in case you forgot where it was):
Click here to view the secret text

01-15-2015 at 11:36 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
Quewort
Level: Delver
Rank Points: 52
Registered: 01-08-2015
IP: Logged
icon Re: Scripting problem... (0)  
Well, I decided to post any scripting problem here.

I want to run cut scene if player is in specific place and facing north. If player walk through this place not facing north, then script not ends, allowing player to try again.
I know that in order to make this script I have to use conditional commands but nothing comes of it. I admit I'm bad at scripting :(
10-04-2015 at 02:39 PM
View Profile Send Private Message to User Show all user's posts Quote Reply
kieranmillar
Level: Smitemaster
Rank Points: 3801
Registered: 07-11-2014
IP: Logged
icon Re: Scripting problem... (0)  
Here's a script that makes the player character fart when standing on square (1, 1) while facing North. You'll want to adjust the co-ordinates as necessary, and replace the Speech line with your cutscene coding.
Label Loop
  If ... 
        Wait for entity Player 1,1,1,1
     If ... 
           Wait until var "_O" = 1
        Speech "*fart*",Normal,Player,0,.
        Go to Skip to End
     If End 
  If End 
  Wait 0
  Go to Loop
Label Skip to End

If you want to copy this into your game, copy it to your clipboard then press Ctrl+Shift+B in the character scripting area to paste it.


The useful thing here is that the direction the player is facing can always be accessed and changed via the variable _O (the O stands for "Orientation"). The numbers that represent which direction are as follows:
0   1   2
3       5
6   7   8

Note that the missing number 4 stands for "no direction" and is used for things that don't care about direction, like a mirror, a value of 4 makes no sense for players and monsters etc.
10-04-2015 at 04:07 PM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
Quewort
Level: Delver
Rank Points: 52
Registered: 01-08-2015
IP: Logged
icon Re: Scripting problem... (0)  
Ah, thanks. I did it exactly as you except not using if end commands and using wait for player to face instead of _O.

[Last edited by Quewort at 10-04-2015 05:31 PM]
10-04-2015 at 05:31 PM
View Profile Send Private Message to User Show all user's posts Quote Reply
jokokoe
Level: Master Delver
Avatar
Rank Points: 101
Registered: 02-19-2010
IP: Logged
icon Re: Scripting problem... (0)  
I'm using this topic to ask a question about scripting !
One of my variable (CHALL) will get +1 if a condition is true. Then I'm using the command :

speech "you have $<CHALL>$ challenge points"

but nothing appear. Is this command only working for text ?
How can I see the number that is attached to the variable CHALL in a speech command ? thanks you.

____________________________
My Holds :

Architecture Salon
Do it Again
10-14-2015 at 07:25 PM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
kieranmillar
Level: Smitemaster
Rank Points: 3801
Registered: 07-11-2014
IP: Logged
icon Re: Scripting problem... (0)  
It's $CHALL$, not $<CHALL>$
10-14-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
jokokoe
Level: Master Delver
Avatar
Rank Points: 101
Registered: 02-19-2010
IP: Logged
icon Re: Scripting problem... (0)  
Thank you ! that works great :)

____________________________
My Holds :

Architecture Salon
Do it Again
10-14-2015 at 09:32 PM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
Quewort
Level: Delver
Rank Points: 52
Registered: 01-08-2015
IP: Logged
icon Re: Scripting problem... (0)  
I don't quite see why command Build (Obstacle) doesn't work. Is it possible to build it or I should use image wall?
11-08-2015 at 12:48 PM
View Profile Send Private Message to User Show all user's posts Quote Reply
Quewort
Level: Delver
Rank Points: 52
Registered: 01-08-2015
IP: Logged
icon Re: Scripting problem... (0)  
Well, I want character to shake itself randomly by using Image overlay command, but it requires to import an image.
So, what am I supposed to do? Should I take image of character? I'm confused.
12-10-2015 at 03:03 PM
View Profile Send Private Message to User Show all user's posts Quote Reply
New Topic New Poll Post Reply
Caravel Forum : DROD Boards : Architecture : Scripting problem...
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.9
Originally created by Toan Huynh (Copyright © 2000)
Enhanced by the tForumHacks team and the Caravel team.