dMZX Forums: Rel Player/Self Also works with Directions -> Archived Requests -> Tracker

Jump to content

Report ID 876 Title Rel Player/Self Also works with Directions
Product Archived Requests Status Closed - No Change (Severity 0 - None Assigned)
Version - Fixed in -

Page 1 of 1
  • Cannot start a new Issue
  • Closed Issue This issue is locked

Report ID #876: Rel Player/Self Also works with Directions

#1 User is offline  
hseiken 

  • Member
  • PipPip
  • Group: Members
  • Posts: 107
  • Joined: 05-March 20
  • Gender:Not Telling
  • Location:Earf

Posted 27 November 2024 - 08:55 PM

While doing some noodling as I do, I figured out by accident why my script wasn't working and that's because REL TO PLAYER doesn't work nor does REL TO SELF when using cardinal direction checks...i.e.

REL TO SELF
IF BLOCKED SOUTH THEN DONTMOVE
MOVE SOUTH 1


This doesn't not behave 'intuitively' It's a minor quirk, but it confused me so I'm sure I'm not the only one in history who bumped into this bit of robotic and scratched their head for an hour or over it. Again, it's not a big deal, but intuitively, rel would 'just work' for directions as well since they're short hand for x y coordinates in the first place.
There is no Data, only Zuul.


Page 1 of 1  
  • Cannot start a new Issue
  • Closed Issue This issue is locked

Replies (1 - 3)

#2 User is offline  
Wervyn 

  • I can see you
  • Group: DigiStaff
  • Posts: 1,855
  • Joined: 24-December 00
  • Gender:Male
  • Location:Caras Galadhon

Posted 27 November 2024 - 09:37 PM

This should already be the case, as seen in the explanation for the "BLOCKED" conditional found in the help file. I've attached a quick test below which I used to verify that it is in fact working. Throw it in a robot and put some crates on the board that you can push around to test each condition. (Also note that "rel to self" is redundant in this case, since "BLOCKED" uses the robot as the reference by default, but using it doesn't hurt anything.) It's possible there's a bug in your own code; could you provide it for comparison?

set "$bool0" to "FALSE"
set "$bool1" to "TRUE"
set "XPOS" to 19
set "YPOS" to 4
put c0a Carpet p00 at "XPOS" "YPOS"

: "L"
set "plblock" to 0
set "roblock" to 0
set "coblock" to 0
rel to player
if blocked SOUTH then "#plblock"
rel to self
if blocked SOUTH then "#roblock"
rel to counters
if blocked SOUTH then "#coblock"
* "~FPlayer: &$bool('plblock')& - Robot: &$bool('roblock')& - Counters: &$bool('coblock')&"
wait for 1
goto "L"

: "#plblock"
set "plblock" to 1
goto "#return"
: "#roblock"
set "roblock" to 1
goto "#return"
: "#coblock"
set "coblock" to 1
goto "#return"


#3 User is offline  
Terryn 

  • ******
  • Group: DigiStaff
  • Posts: 2,966
  • Joined: 12-October 00
  • Gender:Male

Posted 01 March 2025 - 06:35 PM

Updating status to: Closed - No Change
Updating version to: None

Since there's been no clarifying reply to this, I'm closing this issue.
angelic stream - shed sanguine - ill-adapt - avis - para/lyser - renaissance - dead tangent - phosphene blur - birth breeds death - ________ - painted glass - lagniappe

<Exophase> HES STEALING MAH AIRSHIP!!!!!!11111111

#4 User is offline  
Terryn 

  • ******
  • Group: DigiStaff
  • Posts: 2,966
  • Joined: 12-October 00
  • Gender:Male

Posted 01 March 2025 - 06:36 PM

Moving to: Archived Requests


Page 1 of 1
  • Cannot start a new Issue
  • Closed Issue This issue is locked

0 User(s) are reading this issue
0 Guests and 0 Anonymous Users


Powered by IP.Tracker 1.3.2 © 2025  IPS, Inc.