Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by EternallyCurious. 04/18/24 10:45
StartWeek not working as it should
by Zheka. 04/18/24 10:11
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
zorro 64bit command line support
by 7th_zorro. 04/15/24 09:36
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:48
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 600 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, 11honza11, ccorrea, sakolin, rajesh7827
19046 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Display a message #289879
09/16/09 03:02
09/16/09 03:02
Joined: Sep 2009
Posts: 155
France
ayks Offline OP
Member
ayks  Offline OP
Member

Joined: Sep 2009
Posts: 155
France
hi, this time i'm trying to display a simple message..
(tried to look in aum and i have dl demo, + tried to do something with messages.wdl but can't succeed for now, prolly due to noobness --)

so, if someone could explain me briefly just how to display a single message, would be sufficiant:|

Re: Display a message [Re: ayks] #289883
09/16/09 03:49
09/16/09 03:49
Joined: Jul 2008
Posts: 553
Singapore
delinkx Offline
User
delinkx  Offline
User

Joined: Jul 2008
Posts: 553
Singapore
how u want to display this message ? by a system box or within the screen ?

if system box, see "printf" under manual.
if on screen then see "panels" under manual or "text"


A7 commercial Team / VC++ 2008 Pro
homepage | twitter | facebook
Re: Display a message [Re: ayks] #289897
09/16/09 07:38
09/16/09 07:38
Joined: Jul 2009
Posts: 36
S
SomebodyNew Offline
Newbie
SomebodyNew  Offline
Newbie
S

Joined: Jul 2009
Posts: 36
I think this is exactly what you are looking for.

Enjoy

Re: Display a message [Re: SomebodyNew] #289932
09/16/09 11:39
09/16/09 11:39
Joined: Aug 2007
Posts: 1,922
Schweiz
Widi Offline
Serious User
Widi  Offline
Serious User

Joined: Aug 2007
Posts: 1,922
Schweiz
Yes, as SomebodyNew says: make the Workshop!

Re: Display a message [Re: ayks] #289951
09/16/09 13:36
09/16/09 13:36
Joined: Sep 2009
Posts: 155
France
ayks Offline OP
Member
ayks  Offline OP
Member

Joined: Sep 2009
Posts: 155
France
thx for answers, i ll go look it now and i wanna make a system box message laugh (printf remember me "C"'s souvenir :x)

edit : dunno if its mega-old or what but the simple "script07" dont work, i got error like "parameter unknown pos_x". sort of annoying for follow the tutorial-.

Last edited by ayks; 09/16/09 21:06.
Re: Display a message [Re: ayks] #290239
09/17/09 20:08
09/17/09 20:08
Joined: Sep 2009
Posts: 155
France
ayks Offline OP
Member
ayks  Offline OP
Member

Joined: Sep 2009
Posts: 155
France
still trying to do something.. i found a script on this forum and i'm trying to make it work for starts something, but i got an error (original --')

here the error screen (i put the action on a basic model)

here the script (.c) or here

and here the include of the script in the main .wdl of the project

can someone tell me what i'm supposed to do for remove the first screen's error please -'

Re: Display a message [Re: ayks] #290242
09/17/09 21:15
09/17/09 21:15
Joined: Aug 2008
Posts: 2,838
take me down to the paradise c...
Cowabanga Offline
Expert
Cowabanga  Offline
Expert

Joined: Aug 2008
Posts: 2,838
take me down to the paradise c...
Actually, you can't include Lite-C files in a C-Script file

Re: Display a message [Re: Cowabanga] #290244
09/17/09 21:22
09/17/09 21:22
Joined: Sep 2009
Posts: 155
France
ayks Offline OP
Member
ayks  Offline OP
Member

Joined: Sep 2009
Posts: 155
France
damn and thx for answer, i ll try to look for another method but its boring me, 2 days im trying to display a single message at the press of a key on a model t_t

does anyone know use messages.wdl in order to display a message easily, tried to include it but can't do anything with it :\


edit : i looked the workshop, "message", "action", etc, tried to start from the 1# but when i tried to do something in order to import them in my game i always get error -.

new edit : ok i succeeded in displaying a message on the screen (just added it at the end of messages.wdl :)) , now i just want to make that the message display only when i press CTRL face on a model, i return search but if i dont disagree if i can get some help laugh




now, I just need to get a condition for make my message displays when ctrl or space is pressed on a model (character)

screenshot

here what i have for now but i don't know how to put the "on_w", i need something like

"if (on_w && my.enable.scan = on)
{
my.event = key_pîckup;"
}

but it dont works so if someone has a solution for me..

(for now, i got the message which shows up when i go near the model, but i want the condition "on_w" as well, as a normal dialog box with a character..)

Last edited by ayks; 09/18/09 01:59.
Re: Display a message [Re: ayks] #290276
09/18/09 07:52
09/18/09 07:52
Joined: Nov 2007
Posts: 1,143
United Kingdom
DJBMASTER Offline
Serious User
DJBMASTER  Offline
Serious User

Joined: Nov 2007
Posts: 1,143
United Kingdom
try "key_w==1" instead of on_w.

Re: Display a message [Re: ayks] #290277
09/18/09 07:55
09/18/09 07:55
Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
Xarthor Offline
Expert
Xarthor  Offline
Expert

Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
There are two other possibilities I can think of right away:

1. Give the entity action a while loop and check the distance to the player inside of it. If the player is in "communication-range" check if the "communicate-button" is pressed (with key_X not on_X .. X being any key, like w, a, and so on). If that is the case, show your dialogue.
example code (quick 'n dirty)
Code:
action my_npc
{
  while(!player) { wait(1); } // wait for the player pointer to become valid
  
  while(me) // as long as the entities is alive
  {
    if(vec_dist(my.x,player.x) < 200)
    {
      if(key_w)
      {
        while(key_w) { wait(1); } //wait for the key to be released (fail safe)
        show_dialog();
      }
    }
 
    wait(1);
  }
}



2. The second approach uses c_scan and the event function of the entities and might reduce the processing overkill by checking the distance to the player each frame. This will come in handy if you have a huge number of entities that can be talked to by the player.
This would function like:
- the player approaches a character he wants to talk to and faces him
- if the player presses a key, a scan (c_scan) will be performed in a small circle segment to the front of the player, so hopefully the character he wants to talk to is the closest entity return by the scan function
- now the entity has an event function which is triggered by the scan, if all checks are ok (scanning entity is the player etc.) than start the dialogue

Page 1 of 2 1 2

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1