Jump to content

Photo

Guards


  • Please log in to reply
10 replies to this topic

#1 Sans

Sans

    Hey kid wanna buy hot dogs ?

  • Members
  • Location:Judgement Hall

Posted 10 October 2017 - 11:31 AM

Hello everyone. I want to ask you a request. 

 

Guard_CastleFFC script

 

Actually they'll mimic the Oracle of Ages guards types. 

It's simple: The guard will walks on every Raft Flag combo type (automatic or manual). When they turn to up, down, right, or left they combo will changes. 

Combo types of the guard depend on direction where they look if they changes direction. If they see Link they'll knock off Link outside the castle or put him in prison. 

D0 is the combo if they going up, 

D1 is the combo if they going down.

D2 is the combo if they going right.

D3 is the combo if they going left.

D4 is the sound if they see Link before the string.

D5 is the string if they see Link after the sound.

D6 is the warp A to D (0 to 3) where Link have to warp if they see Link and after they go to him for some seconds. 

D7 is the string after Link is knock off after the warp. 

 

I don't use the Raft item but just disable the Raft functions on any case of bugs. 


Edited by Sans, 10 October 2017 - 11:56 AM.


#2 PixElvis

PixElvis

    Creative?

  • Members
  • Real Name:Elvis
  • Pronouns:He / Him
  • Location:Dominican Republic

Posted 10 October 2017 - 07:37 PM

You mean those guards that if they see you, they return you or they take you out of the palace?



#3 Sans

Sans

    Hey kid wanna buy hot dogs ?

  • Members
  • Location:Judgement Hall

Posted 10 October 2017 - 08:10 PM

Yes exactly like that.


  • PixElvis likes this

#4 PixElvis

PixElvis

    Creative?

  • Members
  • Real Name:Elvis
  • Pronouns:He / Him
  • Location:Dominican Republic

Posted 10 October 2017 - 08:55 PM

Excellent  :approve:



#5 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 11 October 2017 - 12:17 AM

Yes exactly like that.


Infinite range of sight?

Are they mobile; or standing still? Following a specific path?

This is set up to use changers, to define the path of a mobile ffc. It spawns a dummy npc and it moved the npc, and sets its facing direction, so you can skip all of the messy combo set-up.

Fully-tested, with a demo quest. This now allows placing solid objects to block LoS, with the single caveat that if Link overlaps one from below, then he can be seen. I may address that in the future, but this should do what you want:
 


Demo Quest

The starting screen has a horizontal sentry, and inside the dungeon, screen 0x57 has a vertical sentry. Both are set up to display blue darknuts.

I also recorded videos of creating this script, and debugging it, for anyone who may desire to see the entire process.



Part 1: Initial Coding (15m30s)
Part 2: Continued Coding (7m52s)
Part 3: Debug and Polish + ZQuest (1h19m10s)
Part 4: Playtest (1m10s)

Total dev time: 1h:43m:32s

Edited by ZoriaRPG, 11 October 2017 - 08:41 AM.


#6 Sans

Sans

    Hey kid wanna buy hot dogs ?

  • Members
  • Location:Judgement Hall

Posted 11 October 2017 - 10:39 AM

Something's wrong there. The DMap it's ok but the screen destination is a problem: I cannot use the letter with the number so if i put a room on 7A for exemple the argument will not take that so that pretty hard for me to know exactly the position where Link must be go after the guard see him.



#7 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 11 October 2017 - 10:51 AM

Something's wrong there. The DMap it's ok but the screen destination is a problem: I cannot use the letter with the number so if i put a room on 7A for exemple the argument will not take that so that pretty hard for me to know exactly the position where Link must be go after the guard see him.

 

Nothing is wrong. ZQuest screens are hexadecimal, and the FFC editor only accepts decimal input.

 

7A in Hex is 112 in decimal. I suggest using a conversion utility, if you can't work out hex to dec in your head: :D

 

http://hextodecimal.com/index.php

 

Here is a minor update to the script:

 

 

Changelog

 

0.4.3

Added check for Link->Invisible

 

0.4.2

Added precision settings for proximity checking.

 

0.4.1

Removed unused values.

 

The most current file will always be here:

https://github.com/Z...vingSentinel.zs

 

Please update to version 0.4.3, to avoid bugs with invisibility, and to make use of the sensitivity updates.


Edited by ZoriaRPG, 11 October 2017 - 10:53 AM.


#8 Sans

Sans

    Hey kid wanna buy hot dogs ?

  • Members
  • Location:Judgement Hall

Posted 11 October 2017 - 12:25 PM

That works and more understanding. Oh by the way here's a little glitch with the Npc when he walks. The sprite is been here but he sometimes shaking or something like that but not really bad.



#9 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 11 October 2017 - 01:12 PM

That works and more understanding. Oh by the way here's a little glitch with the Npc when he walks. The sprite is been here but he sometimes shaking or something like that but not really bad.

 

That's the inevitable consequence of changing the direction of an NPC after Waitdraw, that you cannot avoid with ffc scripts.



#10 Sans

Sans

    Hey kid wanna buy hot dogs ?

  • Members
  • Location:Judgement Hall

Posted 11 October 2017 - 02:41 PM

oh i see.



#11 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 12 October 2017 - 08:58 AM



That works and more understanding. Oh by the way here's a little glitch with the Npc when he walks. The sprite is been here but he sometimes shaking or something like that but not really bad.

 

I figured out what was causing this, other than WD timing. It was an enemy editor setting. I had forgotten to set the enemy editor values for Rate, Random, Homing, and Step to 0; and thus, the enemy was trying to internally change its direction when the ffc was otherwise forcing it, creating a variable clash.

 

 

I also made a slight adjustment to the code, to optimise when the direction is set for the npc (immediately on resolution).

 

 

Updated Test Quest

 

Make a new enemy and be sure to set Random, Rate, Homing, and Step each to 0.


Edited by ZoriaRPG, 12 October 2017 - 09:47 AM.



1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users