RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
Making events interact...

0 Members and 2 Guests are viewing this topic.

**
Rep: +0/-0Level 85
...This may not be possible without RGSS if it's possible at all so if I should be asking for a script for this instead please let me know..  But anyway, I want my events to be able to activate other events when they collide with them just as a player can do..  To give you guys a better perspective of what I mean, I'm doing a SRPG where each tile has certain terrain properties that will effect each unit, so it's important that the NPCs can obtain these properties from each terrain block as well..

My idea was that each tile would have an event on it that would hold the properties for it's terrain then when the player or the npc stepped on the block that all the properties could be transferred to them; however, if the NPCs can't interact with other events it will cause a problem..

********
Hungry
Rep:
Level 96
Mawbeast
2013 Best ArtistParticipant - GIAW 11Secret Santa 2013 ParticipantFor the great victory in the Breakfast War.2012 Best Game Creator (Non-RM Programs)~Bronze - GIAW 9Project of the Month winner for December 2009Project of the Month winner for August 20082011 Best Game Creator (Non RM)Gold - GIAW Halloween
on event touch~

also, you could try looking up how to use terrain tags, and/or tracking event coordinates
« Last Edit: September 09, 2008, 03:08:53 PM by NAMKCOR »

FCF3a A+ C- D H- M P+ R T W- Z- Sf RLCT a cmn+++ d++ e++ f h+++ iw+++ j+ p sf+
Follow my project: MBlok | Find me on: Bandcamp | Twitter | Patreon

**
Rep: +0/-0Level 85
The event coordinates could probably work out well..  I can't seem to find on event touch though..  The only triggers I have on my list are:

Action Key
Hero Touch
Collision
Auto Start
Parallel Process

********
Hungry
Rep:
Level 96
Mawbeast
2013 Best ArtistParticipant - GIAW 11Secret Santa 2013 ParticipantFor the great victory in the Breakfast War.2012 Best Game Creator (Non-RM Programs)~Bronze - GIAW 9Project of the Month winner for December 2009Project of the Month winner for August 20082011 Best Game Creator (Non RM)Gold - GIAW Halloween
collision, it determines if something happens when the event hits the hero, instead of the other way around.

for event vs event, you'll have to track map coordinates I think

FCF3a A+ C- D H- M P+ R T W- Z- Sf RLCT a cmn+++ d++ e++ f h+++ iw+++ j+ p sf+
Follow my project: MBlok | Find me on: Bandcamp | Twitter | Patreon

**
Rep: +0/-0Level 85
Oh, alright..  That'll be a bit more troublesome, but it shouldn't be too difficult.  Thanks for all your help...

********
Hungry
Rep:
Level 96
Mawbeast
2013 Best ArtistParticipant - GIAW 11Secret Santa 2013 ParticipantFor the great victory in the Breakfast War.2012 Best Game Creator (Non-RM Programs)~Bronze - GIAW 9Project of the Month winner for December 2009Project of the Month winner for August 20082011 Best Game Creator (Non RM)Gold - GIAW Halloween
you can use variables in events and set them equal to event positions, then use conditional branches to compare the coordinates of multiple events :D

alternatively, you could look into terrain tags and scripting involving them :)

FCF3a A+ C- D H- M P+ R T W- Z- Sf RLCT a cmn+++ d++ e++ f h+++ iw+++ j+ p sf+
Follow my project: MBlok | Find me on: Bandcamp | Twitter | Patreon

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
You wouldn't even need scripting. You can set a variable to the terrain tag that any given event or player is on and modify the attributes under a conditional branch.

********
Hungry
Rep:
Level 96
Mawbeast
2013 Best ArtistParticipant - GIAW 11Secret Santa 2013 ParticipantFor the great victory in the Breakfast War.2012 Best Game Creator (Non-RM Programs)~Bronze - GIAW 9Project of the Month winner for December 2009Project of the Month winner for August 20082011 Best Game Creator (Non RM)Gold - GIAW Halloween
You wouldn't even need scripting. You can set a variable to the terrain tag that any given event or player is on and modify the attributes under a conditional branch.

I haven't found terrain tag interactions in teh event window, pardon for assuming they didn't exist n_n;;

FCF3a A+ C- D H- M P+ R T W- Z- Sf RLCT a cmn+++ d++ e++ f h+++ iw+++ j+ p sf+
Follow my project: MBlok | Find me on: Bandcamp | Twitter | Patreon

**
Rep: +0/-0Level 85
You wouldn't even need scripting. You can set a variable to the terrain tag that any given event or player is on and modify the attributes under a conditional branch.

Yea, this is what I had in mind.  I'll probably stick a parallel process event in each map, maybe one for each character..  I haven't completely run the logic through my head yet, but I'll use the parallel processes to constantly check the location of each character and apply the terrain effects accordingly...  This actually will be a lot easier and efficient then what I was originally planning..  Thanks guys..

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
You wouldn't even need scripting. You can set a variable to the terrain tag that any given event or player is on and modify the attributes under a conditional branch.

I haven't found terrain tag interactions in teh event window, pardon for assuming they didn't exist n_n;;

Yeah, it's not in an easy place. It's in Control Variable: Character: Terrain Tag

And @taichi - using terrain tags, you do not need to check location. That Control Variable command will automatically return the terrain tag of the tile that the character is standing on.

********
Hungry
Rep:
Level 96
Mawbeast
2013 Best ArtistParticipant - GIAW 11Secret Santa 2013 ParticipantFor the great victory in the Breakfast War.2012 Best Game Creator (Non-RM Programs)~Bronze - GIAW 9Project of the Month winner for December 2009Project of the Month winner for August 20082011 Best Game Creator (Non RM)Gold - GIAW Halloween
what about enemy events, modern?
can those be tracked in teh same fashon?

FCF3a A+ C- D H- M P+ R T W- Z- Sf RLCT a cmn+++ d++ e++ f h+++ iw+++ j+ p sf+
Follow my project: MBlok | Find me on: Bandcamp | Twitter | Patreon

**
Rep: +0/-0Level 85
You wouldn't even need scripting. You can set a variable to the terrain tag that any given event or player is on and modify the attributes under a conditional branch.

I haven't found terrain tag interactions in teh event window, pardon for assuming they didn't exist n_n;;

Yeah, it's not in an easy place. It's in Control Variable: Character: Terrain Tag

And @taichi - using terrain tags, you do not need to check location. That Control Variable command will automatically return the terrain tag of the tile that the character is standing on.

Hm, I think I see how the terrain tags work; however, I don't think it will be as suitable for my usage..  From what I gather, the terrain tag is linked to a specific tile whereas my terrain system even if the character is on grass, it still will have varying properties due to shadows for cover..  I think my aforementioned implementation is going to be easier to use for this...

********
Hungry
Rep:
Level 96
Mawbeast
2013 Best ArtistParticipant - GIAW 11Secret Santa 2013 ParticipantFor the great victory in the Breakfast War.2012 Best Game Creator (Non-RM Programs)~Bronze - GIAW 9Project of the Month winner for December 2009Project of the Month winner for August 20082011 Best Game Creator (Non RM)Gold - GIAW Halloween
there's shadowed grass ?_?

FCF3a A+ C- D H- M P+ R T W- Z- Sf RLCT a cmn+++ d++ e++ f h+++ iw+++ j+ p sf+
Follow my project: MBlok | Find me on: Bandcamp | Twitter | Patreon

**
Rep: +0/-0Level 85
there's shadowed grass ?_?

No, no..  Well, we are making our own tilesets for our project; however, we are going to have shadows as well which are going to have an effect on the terrain blocks' values..  If the terrain all share the same values for the same tile then using terrain maps won't work for my implementation...

********
Hungry
Rep:
Level 96
Mawbeast
2013 Best ArtistParticipant - GIAW 11Secret Santa 2013 ParticipantFor the great victory in the Breakfast War.2012 Best Game Creator (Non-RM Programs)~Bronze - GIAW 9Project of the Month winner for December 2009Project of the Month winner for August 20082011 Best Game Creator (Non RM)Gold - GIAW Halloween
are the shadows going to be separate from the grass on the tileset?

FCF3a A+ C- D H- M P+ R T W- Z- Sf RLCT a cmn+++ d++ e++ f h+++ iw+++ j+ p sf+
Follow my project: MBlok | Find me on: Bandcamp | Twitter | Patreon

**
Rep: +0/-0Level 85
are the shadows going to be separate from the grass on the tileset?

Most likely, yes..

********
Hungry
Rep:
Level 96
Mawbeast
2013 Best ArtistParticipant - GIAW 11Secret Santa 2013 ParticipantFor the great victory in the Breakfast War.2012 Best Game Creator (Non-RM Programs)~Bronze - GIAW 9Project of the Month winner for December 2009Project of the Month winner for August 20082011 Best Game Creator (Non RM)Gold - GIAW Halloween
hmm.....

will a terrain tag on a higher layer override a lower layer's terrain tag I wonder...

FCF3a A+ C- D H- M P+ R T W- Z- Sf RLCT a cmn+++ d++ e++ f h+++ iw+++ j+ p sf+
Follow my project: MBlok | Find me on: Bandcamp | Twitter | Patreon

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
Yeah NAM, you can set it to events or player. So as long as they are actual events and not just sprites from a script. And yes, terrain tag is taken from the highest layer with a tag.

Spoiler for Code:
Code: [Select]
  #--------------------------------------------------------------------------
  # * Get Terrain Tag
  #     x          : x-coordinate
  #     y          : y-coordinate
  #--------------------------------------------------------------------------
  def terrain_tag(x, y)
    if @map_id != 0
      for i in [2, 1, 0]
        tile_id = data[x, y, i]
        if tile_id == nil
          return 0
        elsif @terrain_tags[tile_id] > 0
          return @terrain_tags[tile_id]
        end
      end
    end
    return 0
  end

That's not for you taichi. Just for NAM if he's interested in the method to get terrain tag.

Anyway, so yeah, if your shadow is it's own tile, you can give it a terrain tag and it will take it. You'll only really encounter problems if (a) you need more than 7 (8?) tags or (b) if you want two identical tiles (as in identical layers too) to have the same tag. Though actually, you could use a transparent tile with unique tag on the 3rd layer if you didn't need the 3rd layer on that tile.

(a) could be solved with a minor script
(b) could be too, but configuration might be a bitch. Both would be annoying actually, but (a) would be by tileset and (b) would be by map
« Last Edit: September 09, 2008, 07:33:32 PM by modern algebra »

********
Hungry
Rep:
Level 96
Mawbeast
2013 Best ArtistParticipant - GIAW 11Secret Santa 2013 ParticipantFor the great victory in the Breakfast War.2012 Best Game Creator (Non-RM Programs)~Bronze - GIAW 9Project of the Month winner for December 2009Project of the Month winner for August 20082011 Best Game Creator (Non RM)Gold - GIAW Halloween
ah cool, thanks :D

FCF3a A+ C- D H- M P+ R T W- Z- Sf RLCT a cmn+++ d++ e++ f h+++ iw+++ j+ p sf+
Follow my project: MBlok | Find me on: Bandcamp | Twitter | Patreon