Ikarus (Pakiet skryptów) 283838 1020

O temacie

Autor orcwarrior

Zaczęty 11.06.2010 roku

Wyświetleń 283838

Odpowiedzi 1020

Siemekk

Siemekk

Złote Wrota
Untersturmfuhrer
posty2143
Propsy1151
ProfesjaProgramista
  • Złote Wrota
  • Untersturmfuhrer
Działa, ale to jest baardzo dziwne... Gdy dam deszcz np. 5h to nie pada... O co z tym chodzi? Jak mam zrobić losowe opady jeżeli działa to tak jak teraz?
 

P.S A Splash w szafie i nie ma psychy by mi dać bana.

Toworish

Toworish

Użytkownicy
http://chomikuj.pl/ToWoRiSh
posty1664
Propsy254
ProfesjaNierób
  • Użytkownicy
  • http://chomikuj.pl/ToWoRiSh
Jestem amatorem, ale myślę że wystarczy zrobić wywoływanie raz na jakiś czas, a jeżeli losowe to rzucić w to random

Jako amator zrobiłbym to tak, ale wystarczy zaczekać aż Splash wyłoni magiczny warunek :)
 
Niebawem...Pierdolnę se poradniki do Goticzka. Albo i nie, bo sie mnie nie chce.

Siemekk

Siemekk

Złote Wrota
Untersturmfuhrer
posty2143
Propsy1151
ProfesjaProgramista
  • Złote Wrota
  • Untersturmfuhrer
No tak. Ale co jeśli randomowy deszcz wypadnie mi na 10h? Deszcz nie pada jeżeli jest dłuższy niż chyba 2h i dlatego chcę wiedzieć czemu tak się dzieje.
 

P.S A Splash w szafie i nie ma psychy by mi dać bana.

Splash

Splash

Moderator
posty4207
Propsy3403
ProfesjaNierób
  • Moderator
 
Nie zajmuję się multiplayerami do Gothica. Przestańcie zawracać mi tym głowę...
Ps. Siemekk ma downa i śpi w pufie

Siemekk

Siemekk

Złote Wrota
Untersturmfuhrer
posty2143
Propsy1151
ProfesjaProgramista
  • Złote Wrota
  • Untersturmfuhrer
Używam tego... tylko mam zmienione nazwy zmiennych.
 

P.S A Splash w szafie i nie ma psychy by mi dać bana.

Splash

Splash

Moderator
posty4207
Propsy3403
ProfesjaNierób
  • Moderator
To jak ty to robisz, że mnie to działa poprawnie, a tobie nie?
 
Nie zajmuję się multiplayerami do Gothica. Przestańcie zawracać mi tym głowę...
Ps. Siemekk ma downa i śpi w pufie

Halicor

Halicor

Użytkownicy
Hauptsturmfuhrer
posty365
Propsy57
ProfesjaNierób
  • Użytkownicy
  • Hauptsturmfuhrer
Może gdzieś jednej zmiennej nie zmieniłeś.

Siemekk

Siemekk

Złote Wrota
Untersturmfuhrer
posty2143
Propsy1151
ProfesjaProgramista
  • Złote Wrota
  • Untersturmfuhrer
func void aCRain_Push(var int start_hr, var int start_min, var int end_hr, var int end_min, var int storm)
{
MEM_InitGlobalInst();
start_hr = (start_hr + 12) % 24;
    end_hr  = (end_hr   + 12) % 24;

var int start_float; var int end_float;
    start_float = divf(mkf(start_hr*60 + start_min), mkf(24*60));
    end_float   = divf(mkf(end_hr  *60 + end_min)  , mkf(24*60));

MEM_SkyController.rainFX_timeStartRain = start_float;
MEM_SkyController.rainFX_timeStopRain = end_float;

// aCRain_Clouds(storm);

};
Wywołałem to tak:
if(MEM_KeyState(KEY_X)==KEY_PRESSED)
{
aCRain_Push(10,30,19,30,0);
aCMsg_Create("CustomRain : Test",RGBA(255,255,255,255),15);
};
I nie działa... Ale gdy dam godziny na np. 10:30, 11:30 to działa.
 

P.S A Splash w szafie i nie ma psychy by mi dać bana.

Bogdan Zwei

Bogdan Zwei

Użytkownicy
Wulgarny skurwiel pierdolony.
posty1864
Propsy541
Profesjabrak
  • Użytkownicy
  • Wulgarny skurwiel pierdolony.
Działa. Użyj mojej funkcji na przyśpieszanie czasu i ustaw deszcz na np. 8:00 do 20:00 ALE! czas gry musi być przed godziną 8:00 (chyba, że ustawisz inną godzinę). Domyślnie funkcja działa jeśli godzina wywołania jest mniejsza co najmniej o 1 (wiadomo, czas jest liczony jako float i zwiększa się o 1*fps co klatka).

Przykład, jeśli jest godzina 7:34, a deszcz ma padać o 7:00 to nic się nie stanie. Jeśli godzina jest 8:59 i ma padać od 9:00, będzie padać. Jeśli ma padać od 19:00 do 21:00, a funkcja zostanie wywołana o 5:12, będzie padać.
 
:ok: zachęca do dalszej pomocy. Nie zapominaj o tym!

Prywatne wiadomości typu "Ej, pomocy" kasuję od razu. Od tego jest forum, a nie PW.

To me, defeat in anything is merely temporary, and its punishment is but an urge for me to greater effort to achieve my goal. Defeat simply tells me that something is wrong in my doing; it is a path leading to success and truth.

In order to realize our true self we must be willing to live without being dependent upon the opinion of others.

Siemekk

Siemekk

Złote Wrota
Untersturmfuhrer
posty2143
Propsy1151
ProfesjaProgramista
  • Złote Wrota
  • Untersturmfuhrer
Tak robiłem. Nawet mogę udowodnić :<
    https://www.youtube.com/watch?v=xeF_P61cTeQ&feature=youtu.be   
Jak widać nie działa... Nie rozumiem dlaczego tak długi deszcz nie działa u mnie(Nawet wziąłem funkcję z WoG'a)
 

P.S A Splash w szafie i nie ma psychy by mi dać bana.

Bogdan Zwei

Bogdan Zwei

Użytkownicy
Wulgarny skurwiel pierdolony.
posty1864
Propsy541
Profesjabrak
  • Użytkownicy
  • Wulgarny skurwiel pierdolony.
Wiesz, że deszcze nie pada zaraz? Jeśli dasz duży odstęp czasu to będziesz musiał długo czekać. Jeśli deszcz ma padać od 10 do 20, to o godzinie 5:00 będzie lało. Użyj mojej funkcji na przyśpieszanie czasu i będziesz widział. Jeśli znowu coś nie będzie działać, to źle coś robisz.
 
:ok: zachęca do dalszej pomocy. Nie zapominaj o tym!

Prywatne wiadomości typu "Ej, pomocy" kasuję od razu. Od tego jest forum, a nie PW.

To me, defeat in anything is merely temporary, and its punishment is but an urge for me to greater effort to achieve my goal. Defeat simply tells me that something is wrong in my doing; it is a path leading to success and truth.

In order to realize our true self we must be willing to live without being dependent upon the opinion of others.

Lehona

Lehona

Użytkownicy
posty196
Propsy190
  • Użytkownicy
The first 20% of the time intervall is used to slowly fade in the rain and the last 20% are used to fade out. If you set the current time right in the middle (e.g. via "set time xx" in the console), you should see rain.

Napisałem skrypt który powoduje że jak jest wpis do dziennika to obok wyświetla się tytuł zadania do którego dostaliśmy wpis. I teraz pytanie, jaką funkcje trzeba dać żeby zrobić tak żeby "Wpis do dziennika (zadanie)" było po lewej stronie i po jakimś czasie zanikał?

Do you use LeGo? If so, you could just use PrintS: http://lego.worldofplayers.de/?Interface#PrintS

You might even want to use AI_PrintS(), so diary entries only pop up after the relevant dialog has been said :)
 
Unless specified otherwise, my posts are always about Gothic 2 Night of the Raven.

Siemekk

Siemekk

Złote Wrota
Untersturmfuhrer
posty2143
Propsy1151
ProfesjaProgramista
  • Złote Wrota
  • Untersturmfuhrer
Dobra zapomniałem o tym, że deszcz jest podzielony na FadeIn, FadeOut i Rain. Tak jeszcze jedno xD
Czym zastąpić MEM_AssignContentInstNull za pomocą PermMem?
MEM_AssignContentInst(pierwszy, drugi); zastąpiłem tak:
//MEM_AssignContentInst(pierwszy, drugi);
pierwszy = get(drugi);
Czy to będzie delete(pierwszy); ?
 

P.S A Splash w szafie i nie ma psychy by mi dać bana.

Lehona

Lehona

Użytkownicy
posty196
Propsy190
  • Użytkownicy
You can still use MEM_AssignInstNull(). But without more context (i.e. code) I can't really help you.

Deleting something is different than assigning a null pointer to an instance...
 
Unless specified otherwise, my posts are always about Gothic 2 Night of the Raven.

Siemekk

Siemekk

Złote Wrota
Untersturmfuhrer
posty2143
Propsy1151
ProfesjaProgramista
  • Złote Wrota
  • Untersturmfuhrer
More code:
var int fMsg; var aCMsg hlp;
hlp = get(aCManager.first);

if(aCManager.first)
{
fMsg = hlp.next;
hlp.msgView = 0;
hlp.Line1View = 0;
hlp.Line2View  = 0;

hlp = get(fMsg);
aCManager.first = _@(hlp);

if(aCManager.first == 0)
{
aCManager.last = 0;
delete(_aCMsg_1st);
aCManager.state = aCManager_State_None;
}
else
{
_aCMsg_1st = get(aCManager.first);
_aCMsg_2nd = get(hlp.next);
aCManager.state = aCManager_State_FadeIn;
};
aCManager.count -= 1;
};
And classes:
class aCMsg
{
    var string text;
    var int msgView;
    var int Line1View;   
    var int Line2View;
    var int color;                   
    var int duration;                   
var int next;     
};

class aCMsgManager
{
var int first;
var int last;
var int count;
var int state;
};

INSTANCE aCManager(aCMsgManager);
INSTANCE _aCMsg_1st(aCMsg);
INSTANCE _aCMsg_2nd(aCMsg);
 

P.S A Splash w szafie i nie ma psychy by mi dać bana.

Lehona

Lehona

Użytkownicy
posty196
Propsy190
  • Użytkownicy
Sorry, but I can't just decipher everything from that little bit of code, especially because there are neither comments nor function names (nor type annotations nor is it even complete).

You need to delete the handles at some point (otherwise you will leak handles => memory). No idea whether you did it at the correct point in time.
 
Unless specified otherwise, my posts are always about Gothic 2 Night of the Raven.

Siemekk

Siemekk

Złote Wrota
Untersturmfuhrer
posty2143
Propsy1151
ProfesjaProgramista
  • Złote Wrota
  • Untersturmfuhrer
Ok nieważne xD poczytałem trochę internetów i znalazłem interesującą mnie rzecz. Ale mam takie pytanie. Otóż: jeżeli wysłałem wiadomość, zapisałem grę i wczytałem to wywala mi grę(związane jest to z Anim8 i zCView) Tak więc jak by to dobrze resetować po wczytaniu? Obiekt klasy aCMsg zawierający zCView tworzę tak:

func int aCMsg_Create(var string txt, var int col, var int dur)
{
var int mptr; mptr = new(_aCMsg);
var aCMsg msg; msg = get(mptr);
msg.text = txt;
msg.color = col;
msg.duration = dur;
msg.msgView = 0;
msg.next = 0;
return mptr;
};
Anim8 wygląda tak:
func void aCMsg_UpdatePos(var int hndl, var int value)
{
var zCView v; v = get(hndl);
View_SetPos(hndl, v.vposx, value);

if(v.vposy == 3368)
    {
        if(Hlp_IsValidHandle(hndl))
        {
View_Delete(hndl);
hndl = 0;

aCManager_Pop();
aCManager.state = aCManager_State_None;
        };
    }
else if(v.vposy < 3368)
{
aCManager.state = aCManager_State_InScreen;
};

};

I jak mogę usunąć stary View? Gdy robiłem to na zmiennej fajnie działało z wyjątkiem tego, że w miejscu box'a został tekst :| Byłbym bardzo, ale to bardzo wdzięczny za pomoc ;p
 

P.S A Splash w szafie i nie ma psychy by mi dać bana.

Siemekk

Siemekk

Złote Wrota
Untersturmfuhrer
posty2143
Propsy1151
ProfesjaProgramista
  • Złote Wrota
  • Untersturmfuhrer
Mam takie pytanie dot. zCView do czego są te funkcje w klasie zCView?
virtual int anx(int) { XCALL(0x0068DEF0); }; //0
virtual int any(int) { XCALL(0x0068DF00); }; //4
virtual int nax(int) { XCALL(0x0068DF10); }; //8
virtual int nay(int) { XCALL(0x0068DF20); }; //C
Co one zawracają i co pokazują? Może tak od czego są skróty AN i NA :F
 

P.S A Splash w szafie i nie ma psychy by mi dać bana.

Lehona

Lehona

Użytkownicy
posty196
Propsy190
  • Użytkownicy
an converts a real pixel offset into a virtual pixel offset in the views dimensions. Virtual pixel offsets go from 0-8191 (or 8192). So if your view was 2 pixels wide, anx(1) would return 4096 (i.e. the mid point).

na does the reverse, so for a 2 pixels wide view, nax(4096) would return 1.

LeGo can do the same, although this is currently undocumented (as I just discovered).

zCView::anx(x) == Print_ToVirtual(x, view.psizex)
zCView::nay(y) == Print_ToPixel(y, view.psizey)

Although view.psizex should not be 0 or 1, because the LeGo functions will assume the real pixel height or width of the screen respectively in those cases.
 
Unless specified otherwise, my posts are always about Gothic 2 Night of the Raven.

Siemekk

Siemekk

Złote Wrota
Untersturmfuhrer
posty2143
Propsy1151
ProfesjaProgramista
  • Złote Wrota
  • Untersturmfuhrer
Mam takie pytanie dot. C++ Otóż jak zrozumieć tą funkcję:
INLINE zVEC3 zMAT4::GetAtVector() const
{
return zVEC3(row[0][2], row[1][2], row[2][2]);
}
Co ona zawraca? Są to tablice wielowymiarowe? Nigdy ich nie używałem, ale to chyba one :F
a i struktura klasy gdzie jest to "row"
class zMAT4
{
zVEC4 row[4];
//static zMAT4 s_identity;
public:
zMAT4() {};
zMAT4(zVEC4 const&, zVEC4 const&, zVEC4 const&, zVEC4 const&);
zMAT4(float);
zMAT4& operator+=(zMAT4 const&);
zMAT4& operator-=(zMAT4 const&);
zMAT4& operator*=(float);
zMAT4& operator/=(float);
zVEC4& operator[](int);
const zVEC4& operator[](int) const;
zMAT4 Transpose() const;
zMAT4 Inverse() const;
zMAT4 InverseLinTrafo() const;
zMAT4& Translate(zVEC3 const&);
zMAT4& SetTranslation(zVEC3 const&);
zVEC3 GetTranslation() const;
void GetTranslation(zVEC3&) const;
void SetAtVector(zVEC3 const&);
zVEC3 GetAtVector() const;
void SetUpVector(zVEC3 const&);
zVEC3 GetUpVector() const;
void SetRightVector(zVEC3 const&);
zVEC3 GetRightVector() const;
zVEC3 ExtractScaling() const;
zMAT3 ExtractRotation();
void MakeOrthonormal();
zVEC3 Rotate(zVEC3 const&) const;
void PostRotateX(float);
void PostRotateY(float);
void PostRotateZ(float);
void PostScale(zVEC3 const&);
void PreScale(zVEC3 const&);
zVEC3 GetEulerAngles() const;
void SetByEulerAngles(zVEC3);
BOOL IsUpper3x3Orthonormal() const;
zMAT4& Apply(float (*)(float));
};

 

P.S A Splash w szafie i nie ma psychy by mi dać bana.


0 użytkowników i 1 Gość przegląda ten wątek.
0 użytkowników
Do góry