We've split up the commands, scripting and mods, and add ons category! Please be sure you get your thread in the right place.

3

Add @i - Initial Player

4 Comments

Please sign in to leave a comment.

Sorted by oldest
  • 0
    Registered User commented
    Comment actions Permalink

    I wish to use this selector command to simplify based on when a player interacted a shopping district. It'd make sure a right player if is away from @p @a or other selectors that doesn't match the appropriate execute patterns.

  • 0
    Registered User commented
    Comment actions Permalink

    This is just @s?

  • 0
    Registered User commented
    Comment actions Permalink

    no, @s and @i are two different usages of selectors, while sure it may sound a bit similar but they two have very different features to work.
    @s is basically a self command made for anyone in their own chat or by execute then run with another command.
    @i is a selector works very diffferent but the catch is that no matter have many tried using @p or @s or others within insighted variables. None works to simulate with @i. So having @i is where a person had interacted with a command block by pressing levers, preasure plates or buttons will automatically be chosen.
    Like for example, if you were trying to setup a shop with only one or two command blocks,
    /execute at @i[hasitem={item=diamond,count=5}] run give apple 1 - clear @i[hasitem={item=diamond,count=5}] - when a user pressed or interacted with an object will also attach the command blocks thinking the person who had interacted is trying to buy an apple.
    If this was other way around using @s, @p, or other selectors, and if command has radius variable. Other user will try to sold you out and get an apple free by stealing it from you. Sure in Bedrock edition, players could use npc, but there's always a complicated catch by it. So it would be nice to have another selector that is like or is @i for intitial purpose of selector to help avoid griefing players.

    If you may wonder why I didn't just try using an NPC? Using an NPC is complicated, and it can't run multiple commands like command blocks would. So I avoided NPC entirely.

  • 0
    Registered User commented
    Comment actions Permalink

    nice idea! I have so many functions where I do

    tag @s add caller

    tag @s remove caller

    since any execute as … will lose the execution context