Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[EO] Source Edits [SOLVED]


Drakiac
 Share

Recommended Posts

I have some questions on how to do a few source edits. I have edited the source for scripted tiles and scripted NPC's using Richy's tutorial.

1) I want it so that when a player steps on a scripted tile that it will set that player's variable, let's just say stepv, to 1\. I only want this variable to affect the player, not anyone else. What's the line for this?

2) When a player warps into a room I want this to set off something in the room, such as message saying "Welcome to my room!" Where and How would I edit the source to achieve this?

3) When I have a scripted NPC talking to a player, how can I make it so that the player has to click a key, preferably enter, to hear the next line?

Thanks
-Drakiac
Link to comment
Share on other sites

Thanks Skweek! So, an I replace .name with a variable
Example: Player(index).stepv = 1
Is that the correct way to write it?

Edit: I tried that and it didn't recognize .stepv even after I did Dim stepv.

Also, how do I dim a variable once so that it never dims again? Where can I put it in the source?
Link to comment
Share on other sites

Ok thanks!

Edit:
This is what I put in Playerwarp (I changed variable to Stepdd):
```
    If Player.Stepdd <> 1 Then
        If GetPlayerMap(index) = 4 Then
            Call PlayerMsg(index, "Welcome!", White)
            Stepdd = 1
            Else
        End If
    Else
    Call PlayerMsg(index, "You have already been here...", White)
    End If
```In the modTypes under Private Type PlayerRec I put:
```
Stepdd As Byte
```
When I try to compile it highlights the Player in Player.Stepdd and says Compile error: Invalid Qualifier. What am I doing wrong?

Edit 2:
I fixed it!
```
If GetPlayerMap(index) = 4 Then
        If Player(index).Stepdd <> 1 Then
            Call PlayerMsg(index, "Welcome!", White)
            Player(index).Stepdd = 1
            Else
            Call PlayerMsg(index, "You have already been here...", White)
        End If
    Else
    End If
```
Thank you guys so much!
-Drakiac
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...